Skip to content

Commit

Permalink
Merge pull request #2349 from DenverCoder544/featuredata-update-displ…
Browse files Browse the repository at this point in the history
…ayed-fields-when-tab-removed
  • Loading branch information
ZakarFin authored Jul 24, 2023
2 parents 3075dac + 1668902 commit 6369f43
Showing 1 changed file with 3 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -98,20 +98,19 @@ class FeatureDataPluginUIHandler extends StateHandler {
const activeLayerId = this.determineActiveLayerId(featureDataLayers);
let activeLayerFeatures = null;
let selectedFeatureIds = null;
let newVisibleColumnsSettings = null;
let visibleColumnsSettings = null;
if (activeLayerId && this.getState().flyoutOpen) {
activeLayerFeatures = this.getFeaturesByLayerId(activeLayerId);
selectedFeatureIds = activeLayerFeatures && activeLayerFeatures.length ? this.getSelectedFeatureIdsByLayerId(activeLayerId) : null;
const { visibleColumnsSettings } = this.getState();
newVisibleColumnsSettings = visibleColumnsSettings && visibleColumnsSettings.allColumns?.length ? visibleColumnsSettings : this.createVisibleColumnsSettings(activeLayerFeatures);
visibleColumnsSettings = this.createVisibleColumnsSettings(activeLayerFeatures);
};

return {
activeLayerId,
layers: featureDataLayers,
activeLayerFeatures,
selectedFeatureIds,
visibleColumnsSettings: newVisibleColumnsSettings
visibleColumnsSettings
};
}

Expand Down

0 comments on commit 6369f43

Please sign in to comment.