@esri/solutions-components 0.7.45 → 0.7.47

Sign up to get free protection for your applications and to get access to all the features.
@@ -177,6 +177,7 @@ const LayerTable = class {
177
177
  this._selectAllActive = false;
178
178
  this._showHideOpen = false;
179
179
  this._showOnlySelected = false;
180
+ this._toolInfos = undefined;
180
181
  this._translations = undefined;
181
182
  }
182
183
  //--------------------------------------------------------------------------
@@ -261,15 +262,18 @@ const LayerTable = class {
261
262
  * watch for changes in layer view and verify if it has editing enabled
262
263
  */
263
264
  async _layerWatchHandler() {
264
- var _a, _b, _c;
265
+ var _a;
265
266
  this._fetchingData = true;
266
- this._definitionExpression = (_a = this._layer) === null || _a === void 0 ? void 0 : _a.definitionExpression;
267
- this._floorField = (_c = (_b = this._layer) === null || _b === void 0 ? void 0 : _b.floorInfo) === null || _c === void 0 ? void 0 : _c.floorField;
268
- this._updateFloorDefinitionExpression();
269
- await this._resetTable();
270
- this._updateShareUrl();
271
- this._initLayerExpressions();
272
- this._fetchingData = false;
267
+ await ((_a = this._layer) === null || _a === void 0 ? void 0 : _a.when(async () => {
268
+ var _a;
269
+ this._definitionExpression = this._layer.definitionExpression;
270
+ this._floorField = (_a = this._layer.floorInfo) === null || _a === void 0 ? void 0 : _a.floorField;
271
+ this._updateFloorDefinitionExpression();
272
+ await this._resetTable();
273
+ this._updateShareUrl();
274
+ this._initLayerExpressions();
275
+ this._fetchingData = false;
276
+ }));
273
277
  }
274
278
  /**
275
279
  * watch for selection changes
@@ -439,7 +443,7 @@ const LayerTable = class {
439
443
  */
440
444
  _getActions() {
441
445
  const actions = this._getActionItems();
442
- return actions.reduce((prev, cur) => {
446
+ return actions === null || actions === void 0 ? void 0 : actions.reduce((prev, cur) => {
443
447
  if (cur && !cur.isOverflow) {
444
448
  prev.push(cur.isDanger ?
445
449
  this._getDangerAction(cur.icon, cur.label, cur.func, cur.disabled) :
@@ -658,7 +662,7 @@ const LayerTable = class {
658
662
  if (this._timeout) {
659
663
  clearTimeout(this._timeout);
660
664
  }
661
- if (!this.isMobile) {
665
+ if (!this.isMobile && this._toolbar && this._toolInfos) {
662
666
  this._timeout = setTimeout(() => {
663
667
  clearTimeout(this._timeout);
664
668
  this._setToolbarSizeInfos();
@@ -1065,7 +1069,6 @@ const LayerTable = class {
1065
1069
  this._table.view = this.mapView;
1066
1070
  this._checkEditEnabled();
1067
1071
  this._table.editingEnabled = this._editEnabled && this.enableInlineEdit;
1068
- this._initToolInfos();
1069
1072
  await this.reactiveUtils.once(() => this._table.state === "loaded")
1070
1073
  .then(async () => {
1071
1074
  var _a, _b;
@@ -1091,6 +1094,7 @@ const LayerTable = class {
1091
1094
  }
1092
1095
  this._showOnlySelected = false;
1093
1096
  await this._sortTable();
1097
+ this._initToolInfos();
1094
1098
  this._updateToolbar();
1095
1099
  });
1096
1100
  }