miracleonyenma / custom-vue-range-slider

Custom range slider built with Vue 3
https://custom-vue-range-slider.netlify.app/
23 stars 6 forks source link

Slider min-max validations missing #1

Closed rsram312 closed 1 year ago

rsram312 commented 1 year ago

Hi - I came across your component shared on a blog and I was planning to use something similar. Currently, I do not see validations ensuring slider max is always greater than slider min - or in other words preventing to slider min to be more than slider max. Were you planning to add it to your component by any chance ? @miracleonyenma

miracleonyenma commented 1 year ago

Hey @rsram312, thanks for taking notice of that. I don't have any particular reason why I didn't add the validations plus I was trying to keep the tutorial as simple as possible.

Would you be open to add that validation functionality?

rsram312 commented 1 year ago

@miracleonyenma I actually gave it a try. With the current code, I was having a hard time to get the validations to ensure min to be always less than max could be added to work.

So, any suggestions / changes from you on that would be helpful.

AntiCZ commented 1 year ago

@miracleonyenma Hi, pull request on it: https://github.com/miracleonyenma/custom-vue-range-slider/pull/5 I am not a fun of two ways bindings so you may find better way.

miracleonyenma commented 1 year ago

Merged! @AntiCZ thank you so much.

@rsram312, you can check it out #5