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

updateOptions - tooltips can't be set to a single formatter #1140

Closed
s-cork opened this issue May 31, 2021 · 5 comments · Fixed by #1146
Closed

updateOptions - tooltips can't be set to a single formatter #1140

s-cork opened this issue May 31, 2021 · 5 comments · Fixed by #1146
Labels
Feature Feature requests/suggestions
Milestone

Comments

@s-cork
Copy link
Contributor

s-cork commented May 31, 2021

extension of issue #1101 I think.

@leongersen
Copy link
Owner

Could you add an example?

The following works as expected:

var format = { to: ..., from: ... };

noUiSlider.create(slider, {
    start: [20, 80],
    range: { 'min': 0, 'max': 100 }
});

slider.noUiSlider.updateOptions({ tooltips: format });

@leongersen leongersen added the Support Questions and other support issues label Jun 4, 2021
@s-cork
Copy link
Contributor Author

s-cork commented Jun 4, 2021

right you are - I think i'd done something strange when I was hacking around.

Love the library btw.

@s-cork s-cork closed this as completed Jun 4, 2021
@leongersen
Copy link
Owner

Ok good - Glad you find it useful :)

@s-cork
Copy link
Contributor Author

s-cork commented Jun 5, 2021

I know what it was - I tried to update a tooltip with just a {'to': ...} as a formatter. Since I figured tooltips didn't need a {'from': ...}.

The following code breaks with the error:
noUiSlider: must pass a formatter for all handles

var format = { to: ... };

noUiSlider.create(slider, {
    start: [20, 80],
    range: { 'min': 0, 'max': 100 }
});

slider.noUiSlider.updateOptions({ tooltips: format });

But the code would have worked fine if i'd passed in the same formatter like tooltips: [format, format]

@s-cork s-cork reopened this Jun 5, 2021
@leongersen leongersen added Feature Feature requests/suggestions and removed Support Questions and other support issues labels Jun 6, 2021
@leongersen leongersen added this to the 15.2.0 milestone Jun 6, 2021
@github-actions
Copy link

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators May 25, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Feature Feature requests/suggestions
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants