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

nouislider: Added decimals option #206

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open

nouislider: Added decimals option #206

wants to merge 2 commits into from

Conversation

MrKrabat
Copy link
Contributor

@MrKrabat MrKrabat commented Aug 5, 2020

I have added the decimals option to set the desired number of decimal places. It defaults to 2, which is the default value for nouisliders. This means that this change is not code-breaking.

  • If you set decimals=0, the decimal places are completely removed. This is useful if step=1 is an integer.
  • If you set decimals=1, you get one decimal place. This only makes sense if step=0.1 is a floating point number. Otherwise you could not select such numbers.

Fixes #165

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

How to remove the decimals on noUiSlider?
1 participant