You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The RangeSlider updates the input perfectly. But updating the input field sets everything back to 50. I see that this is related to values being an array. I would guess that most use cases would require a single value.
var value = 50;
<RangeSlider bind:values={value} />
<input type="number" bind:value />
The text was updated successfully, but these errors were encountered:
<script>
let values = [10];
</script>
<RangeSliderbind:values />
<inputbind:value={values[0]} />
To contest your supposition;
I would guess that most use cases would require a single value.
I think the differentiating aspects of this component are;
pips/floats
ranges and multi-handles
config/styling
I struggled a lot -- and there's another PR/Issue regarding the array format of values -- with the choice to make the values an array. I just found far too many bugs/problems with accepting a single value and binding it back, whilst also supporting an array (which is a hard-requirement). Supporting only an array satisfies both requirements.
I think if you only want a single handle, and you are concerned about using the [0] index of the array, then there's probably another slider component you could use... or you could just use the <input type=range /> native HTML :)
The RangeSlider updates the input perfectly. But updating the input field sets everything back to 50. I see that this is related to values being an array. I would guess that most use cases would require a single value.
The text was updated successfully, but these errors were encountered: