min = max #676
min = max #676
Comments
You can set the range to I get that a dynamic form will have this issue, but to me it doesn't make sense to solve it in the control. |
Thanks for the comment. I solved this issue externally now. So when the min equals the max value in the range object I check before I initialize the noUiSlider if min == max - if so, I subtract the step value from the min and add the step value to the max. Additionally I set the start and stop value to the initial min/max value and I disable the slider by setting "behaviour" to "fixed". That way I get a slider rendered which has its handles fixed to the middle and doesn't to anything than staying there. Maybe that would be a good default behaviour for the noUiSlider lib when min == max. Thanks |
I've added a note to the docs, including a link to this issue. |
Hello,
first of all: thank you for this great lib as it helped me to save a lot of dev time.
We use your lib to show filter sliders in a ecommerce setup to filter products by price, width, height, weight, etc. Sometimes it occurs that a user filters so many attributes that there are only a few products left which have the same value for a slider filter. Our setup of noUiSlider looks then like this:
This was already addressed in issues 236, 578 and 633 and you always replied that it makes no sense to setup a range slider with min = max for which I totally agree.
BUT: as I mentioned before in our use case there is no proper way to handle this by the backend. We can't remove a slider filter if the user filtered so much that only one value is left for a certain property as this is very confusing for the user. They ask themselfs where the slider is gone.
What we would need is with this setup is a range slider with fixed handles to the min/max value. It shouldn't have any functionality in this case but only show up in the same way as the other sliders.
Otherwise I would have to rebuild the slider ui just for this case which doesn't make sense.
Thanks again,
best
Simon
The text was updated successfully, but these errors were encountered: