Select to view content in your preferred language

Group Filter Widget - How to make results persist by default?

1313
5
Jump to solution
02-21-2017 09:27 AM
TimNuteson
Emerging Contributor

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

0 Kudos
1 Solution

Accepted Solutions
RobertScheitlin__GISP
MVP Emeritus

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.

View solution in original post

5 Replies
RobertScheitlin__GISP
MVP Emeritus

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.

TimNuteson
Emerging Contributor

Thanks Robert!  This worked perfectly.

Tim

0 Kudos
RobertScheitlin__GISP
MVP Emeritus

Great. Don't forget to mark this question as answered then.

0 Kudos
Mina
by
Emerging Contributor

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!

0 Kudos
RobertScheitlin__GISP
MVP Emeritus

Not that I am aware of.

0 Kudos