Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unify value from noUiSlider #71

Closed
2 tasks done
lionel-bijaoui opened this issue Sep 20, 2016 · 3 comments
Closed
2 tasks done

Unify value from noUiSlider #71

lionel-bijaoui opened this issue Sep 20, 2016 · 3 comments
Labels
Milestone

Comments

@lionel-bijaoui
Copy link
Member

lionel-bijaoui commented Sep 20, 2016

There is a few problem with noUiSlider:

  • It can't dynamically add or remove an handle. It can't wait for the value from the model to know if this is a double handle or not. So we need an option to explicitly tell if this is double or not (like with rangeSlider). EDIT: done in rename dateTime to dateTimePicker and slider to rangeSlider #72
  • When using a single handle, noUiSlider format the data like this [Number, null]. It expect us to use slider.noUiSlider.get(). So, much like with date input, we need a formatValueToField and formatValueToModel to properly format data back and forth.

I'm on both issue and I will do a PR in the next days.

@icebob
Copy link
Member

icebob commented Sep 20, 2016

Nice observation. Thank you

@icebob icebob added this to the v0.5.0 milestone Sep 20, 2016
@icebob icebob added the bug label Sep 20, 2016
@lionel-bijaoui
Copy link
Member Author

lionel-bijaoui commented Sep 21, 2016

Progress: I'm done with noUiSlider, I added some dynamic CSS class and CSS fix with scale.
There is something I can't do though: if you modify the same model with noUiSlider and rangeSlider, modification of rangeSlider make noUiSlider change too, but not the contrary.
I tried different solutions ( almost lost my mind) and was not able to avoid infinite loops. I don't know why, and I give up, since there is no real reason to use both sliders.

@lionel-bijaoui
Copy link
Member Author

lionel-bijaoui commented Sep 22, 2016

@icebob #73 is ready

@icebob icebob closed this as completed in b48c7f1 Sep 22, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants