I am using a Slider widget and would like to have its value reset to zero when the clear button is clicked. I was hoping there was a property or method for this.
I also noticed in the sample here that the slider doesn't reset to zero after the clear button is clicked.
SceneLayerView - query statistics by geometry | ArcGIS API for JavaScript 4.17
Slider | ArcGIS API for JavaScript 4.17
<div aria-label="Slider value" aria-labelledby="bufferNum-label-0" aria-orientation="horizontal" aria-valuemax="500" aria-valuemin="0" aria-valuenow="72" aria-valuetext="72ft" class="esri-slider__anchor esri-slider__anchor-0 esri-slider__anchor--moved" id="bufferNum-handle-0" touch-action="none" role="slider" style="left: 14.40083%" tabindex="0"><span class="esri-slider__thumb" touch-action="none"></span><span class="esri-slider__label" id="bufferNum-label-0" touch-action="none">72ft</span></div>
Solved! Go to Solution.
You can set the Slider widget back to zero by updating Slider.values, for example: slider.values = [0];
Here's an example using the sample you mentioned above: https://codepen.io/annefitz/pen/mdEebEN
I added bufferNumSlider.values = [0]; to the clearGeometry function at line 205.
You can set the Slider widget back to zero by updating Slider.values, for example: slider.values = [0];
Here's an example using the sample you mentioned above: https://codepen.io/annefitz/pen/mdEebEN
I added bufferNumSlider.values = [0]; to the clearGeometry function at line 205.