Select to view content in your preferred language

How to filter layers in custom widget

638
1
06-12-2020 04:22 AM
keerthiappasani
New Contributor

Hi All,

I am creating custom widget for layerlist. In that widget created layers by using layerlist function. at the bottom of the widget i want to filter layers by using a textbox.  Can you please help me in how to filter data

Any help would be appreciated.

Thanks,

keerthi.

0 Kudos
1 Reply
VictorTey
Esri Contributor

Hi keerthi appasani In terms of user experience, i would do it via dom manipulation, using something like dojo query to search the dom for jim-widget-row layer row,  see if the text matches the aria-label text then use dojo dom-style to hide or display the layer element.  see example below.

https://dojotoolkit.org/reference-guide/1.10/dojo/query.html 

Before hidden

After hidden