From 950dffc6a896e7510125f2a00fbc1a60eea0e347 Mon Sep 17 00:00:00 2001 From: Igor Dykhta Date: Wed, 19 Jan 2022 12:27:27 +0200 Subject: [PATCH] dont show hidden layers as options in polygon dropdown menu --- src/components/src/editor/editor.tsx | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/components/src/editor/editor.tsx b/src/components/src/editor/editor.tsx index 46667b3121..e6efb80948 100644 --- a/src/components/src/editor/editor.tsx +++ b/src/components/src/editor/editor.tsx @@ -91,7 +91,9 @@ export default function EditorFactory( ); availableLayersSelector = createSelector(this.layerSelector, layers => - layers.filter(editorLayerFilter).filter(layer => layer.id !== GEOCODER_LAYER_ID) + layers + .filter(editorLayerFilter) + .filter(layer => layer.config?.isVisible && layer.id !== GEOCODER_LAYER_ID) ); allFeaturesSelector = createSelector(