Select to view content in your preferred language

How to reset segmented control

208
3
Jump to solution
06-18-2025 10:13 AM
Labels (1)
MillerDerek
Emerging Contributor

How are segmented control components reset? Setting the value = null or '' effectively clears the selection, but whatever value was previously set is not 'selectable' again until an alternate value is selected.

Here's a pen reproducing the issue - https://codepen.io/derekwmiller/pen/bNdxKEm

Select a value -> click the reset icon / button -> try to select the same value -> cannot select it

 

0 Kudos
1 Solution

Accepted Solutions
KittyHurley
Esri Contributor

@MillerDerek As Kelly mentioned in the linked Community thread this is the intent of the component, where one value is always checked. You can leverage native form capabilities to reset the component, and other components within a form, using the reset method, like so: https://codepen.io/geospatialem/pen/LEVgRZK 

View solution in original post

0 Kudos
3 Replies
MillerDerek
Emerging Contributor
0 Kudos
KittyHurley
Esri Contributor

@MillerDerek As Kelly mentioned in the linked Community thread this is the intent of the component, where one value is always checked. You can leverage native form capabilities to reset the component, and other components within a form, using the reset method, like so: https://codepen.io/geospatialem/pen/LEVgRZK 

0 Kudos
MillerDerek
Emerging Contributor

Got it. Thank you @KittyHurley 

0 Kudos