@smartbit4all/ng-client 3.3.32 → 3.3.34

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -10015,9 +10015,6 @@ class SmartGridComponent {
10015
10015
  if (changes['smartGrid']) {
10016
10016
  this.smartGrid = changes['smartGrid'].currentValue;
10017
10017
  this.service.paginator = this.smartGrid?.paginator;
10018
- if (this.toolbar && this.smartGrid) {
10019
- this.toolbar.id = this.smartGrid?.gridIdentifier + '_toolbar';
10020
- }
10021
10018
  }
10022
10019
  if (changes['uuid']) {
10023
10020
  this.uuid = changes['uuid'].currentValue;
@@ -10055,6 +10052,13 @@ class SmartGridComponent {
10055
10052
  * grid with the newest one.
10056
10053
  */
10057
10054
  async refresh() {
10055
+ // check if toolbar is available _and_ need set up
10056
+ if (this.toolbar && this.smartGrid) {
10057
+ let toolbarId = this.smartGrid?.gridIdentifier + '_toolbar';
10058
+ if (toolbarId !== this.toolbar.id) {
10059
+ this.toolbar.id = toolbarId;
10060
+ }
10061
+ }
10058
10062
  // will cause this.service.gridModelChanged to fire
10059
10063
  await this.service.load(this.uuid, this.smartGrid.gridIdentifier);
10060
10064
  }
@@ -14615,6 +14619,11 @@ class SmartComponentApiClient {
14615
14619
  }
14616
14620
  getAllSmartUiActionToolbars() {
14617
14621
  let toolbars = this.getSmartUiActionToolbarsQL()?.toArray() ?? [];
14622
+ this.getAllSmartGridComponents()?.forEach((grid) => {
14623
+ if (grid.toolbar) {
14624
+ toolbars.push(grid.toolbar);
14625
+ }
14626
+ });
14618
14627
  return toolbars;
14619
14628
  }
14620
14629
  initData() {