When users run the Group Filter widget I've configured, there's an option under the settings gear to "Persist after widget is closed" that I want to enable by default. I'm looking for behavior like the standard filter widget, where the widget can be closed and the filter stays applied to the layer. I'm trying to simplify end user experience and would rather not make them dig into settings each time.
Is there something I can set under the hood to make this happen?
Thanks!
Tim
Solved! Go to Solution.
Tim,
Sure, In the GroupFilter widget Widget.html find this line:
<td class="tdData"><input type="checkbox" data-dojo-type="dijit/form/CheckBox" data-dojo-attach-point="chkPersistDef" data-dojo-props="value:true,checked:false"/> ${nls.labels.PersistDefHeading}</td>
And change checked:false to true.
Tim,
Sure, In the GroupFilter widget Widget.html find this line:
<td class="tdData"><input type="checkbox" data-dojo-type="dijit/form/CheckBox" data-dojo-attach-point="chkPersistDef" data-dojo-props="value:true,checked:false"/> ${nls.labels.PersistDefHeading}</td>
And change checked:false to true.
Thanks Robert! This worked perfectly.
Tim
Great. Don't forget to mark this question as answered then.
Hi Robert Scheitlin, GISP - I am trying to make the group filter persist for multiple instances. For example, if I select polygon ID #1 from the group filter drop down menu, the filter persists when the widget is closed. However, if I select polygon ID #2, then ID #1 disappears from the map. Is it possible to keep both ID #1 and #2 on the map page and only remove them when "Reset" is selected? I tried updating the code as you described, but it did not work in this case. Thank you!
Not that I am aware of.