Closed ReindDooyeweerd closed 2 years ago
Setting value
on input does not produce a change event. You can either fire one yourself, or, simpler, call your event handler:
function changeHandler () {
console.log("change detected");
}
sliderBar.noUiSlider.on("change", function (values, handle) {
/* ... */
changeHandler();
});
document.getElementById("container").addEventListener("change", changeHandler);
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.
Not sure what i'm doing wrong but i'm struggling with change detection. I have a filterbar with some checkboxes and some sliders in it.
Detecting changes inside that sidebar with a simple
document.getElementById("sidebar").addEventListener("change", function() {...});
. It triggers when changes on checkboxes and input fields are detected however after changing an input value with noUiSlider it doesn't trigger.I made a simple example over here:
https://codepen.io/reind/pen/OJOLxqL
Sliding the sliders doesn't trigger the console.log but changing the value in the input field itself does. Anyone who could tell me what i'm missing?