From bb2db2e061bfb48550105320f73f07237e5ec159 Mon Sep 17 00:00:00 2001 From: Josemi Date: Wed, 8 Jan 2025 17:33:47 +0100 Subject: [PATCH] wc: Allow to add a lect content in the grid-toolbar #TASK-7216 #TASK-7100 --- .../commons/opencb-grid-toolbar.js | 100 +++++++++--------- 1 file changed, 49 insertions(+), 51 deletions(-) diff --git a/src/webcomponents/commons/opencb-grid-toolbar.js b/src/webcomponents/commons/opencb-grid-toolbar.js index 87d527a5d..3246788ae 100644 --- a/src/webcomponents/commons/opencb-grid-toolbar.js +++ b/src/webcomponents/commons/opencb-grid-toolbar.js @@ -43,6 +43,9 @@ export default class OpencbGridToolbar extends LitElement { rightToolbar: { type: Array }, + leftContent: { + type: Object, + }, query: { type: Object }, @@ -139,61 +142,56 @@ export default class OpencbGridToolbar extends LitElement { } return html` -
-
-
- -
-
- -
- - ${rightButtons?.length > 0 ? rightButtons.map(rightButton => html` -
- ${rightButton} -
- `) : nothing} - - - ${this._config?.create && (this._settings.showCreate || this._settings.showNew) ? html` -
- - ${isCreateDisabled ? html ` - - - - ` : html ` - - `} -
- ` : nothing} +
+
+ ${this.leftContent || nothing} +
+
+ + ${rightButtons?.length > 0 ? rightButtons.map(rightButton => html` +
+ ${rightButton} +
+ `) : nothing} - ${this._settings.showExport ? html` -
- -
- ` : nothing} + + ` : html ` + + `} +
+ ` : nothing} - ${this._settings?.showSettings ? html` -
- -
- ` : nothing} + ${this._settings.showExport ? html` +
+ +
+ ` : nothing} + + ${this._settings?.showSettings ? html` +
+
-
+ ` : nothing}