leongersen / noUiSlider

noUiSlider is a lightweight, ARIA-accessible JavaScript range slider with multi-touch and keyboard support. It is fully GPU animated: no reflows, so it is fast; even on older devices. It also fits wonderfully in responsive designs and has no dependencies.
https://refreshless.com/nouislider/
MIT License
5.67k stars 660 forks source link

getting values from a map #1202

Closed frenchcdsl44 closed 2 years ago

frenchcdsl44 commented 2 years ago

Hi again

Here is a jsfiddle for anyone interested in mapping their values in an object property like this

let myMap = new Map([
  [0, {
    a: 10,
    b: "a"
  }],
  [1, {
    a: 30,
    b: "b"
  }],
  [2, {
    a: 50,
    b: "c"
  }],
  [3, {
    a: 70,
    b: "d"
  }]
]);

and getting the b property as a result :

https://jsfiddle.net/7fsr5v1e/5/

The only little issue is update event is called only after formatting so I have to reset() the slider in the change event. But it is not an issue for what I have to do.

Thanks. noUiSlider is really powerful!!!

leongersen commented 2 years ago

Thanks for your input here! I'm glad you are finding noUiSlider useful 😊

github-actions[bot] commented 2 years ago

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.