Skip to content

Commit 07a977c

Browse files
authored
Fix #2027 Filter button for Datasets should be active only if the WFS link is available (#2028)
1 parent b1e5659 commit 07a977c

File tree

1 file changed

+6
-2
lines changed
  • geonode_mapstore_client/client/js/plugins/actionnavbar

1 file changed

+6
-2
lines changed

geonode_mapstore_client/client/js/plugins/actionnavbar/buttons.jsx

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -131,15 +131,19 @@ export const LayerDownloadActionButton = connect(
131131

132132
export const FilterLayerActionButton = connect(
133133
(state) => ({
134-
active: !!getSelectedLayer(state)?.layerFilter
134+
layer: getSelectedLayer(state)
135135
}),
136136
{ onClick: openQueryBuilder }
137137
)(({
138138
onClick,
139139
variant,
140140
size,
141-
active
141+
layer
142142
}) => {
143+
const active = !!layer?.layerFilter;
144+
if (!layer?.search) {
145+
return null;
146+
}
143147
return (
144148
<Button
145149
variant={variant}

0 commit comments

Comments
 (0)