We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent c637eab commit 675d118Copy full SHA for 675d118
components/widgets/LayerCatalogWidget.jsx
@@ -79,15 +79,16 @@ class LayerCatalogWidget extends React.PureComponent {
79
}
80
toggleLayerListEntry = (path) => {
81
this.setState((state) => {
82
- const newCatalog = [...state.catalog];
+ const catalogKey = this.state.filteredCatalog ? "filteredCatalog" : "catalog";
83
+ const newCatalog = [...state[catalogKey]];
84
newCatalog[path[0]] = {...newCatalog[path[0]]};
85
let cur = newCatalog[path[0]];
86
for (const idx of path.slice(1)) {
87
cur.sublayers[idx] = {...cur.sublayers[idx]};
88
cur = cur.sublayers[idx];
89
90
cur.expanded = !cur.expanded;
- return {catalog: newCatalog};
91
+ return {[catalogKey]: newCatalog};
92
});
93
};
94
render() {
0 commit comments