Thanks for the useful widget.
I had to catch the input value change for the reaction in my script.
Unfortunately, the widget did not provide such functionality.
And I added it to the widget.
*** 86,102 ****
wrapper.querySelector(".plus-btn").addEventListener("click", function(){
newInputVal = parseInt(numInput.value, 10) + step;
if (newInputVal <= maxVal) {
numInput.value = newInputVal;
}
})
wrapper.querySelector(".minus-btn").addEventListener("click", function(){
newInputVal = parseInt(numInput.value, 10) - step;
if (newInputVal >= minVal) {
numInput.value = newInputVal;
}
})
});
--- 86,102 ----
wrapper.querySelector(".plus-btn").addEventListener("click", function(){
newInputVal = parseInt(numInput.value, 10) + step;
if (newInputVal <= maxVal) {
numInput.value = newInputVal;
+ numInput.dispatchEvent(new Event('change'));
}
})
wrapper.querySelector(".minus-btn").addEventListener("click", function(){
newInputVal = parseInt(numInput.value, 10) - step;
if (newInputVal >= minVal) {
numInput.value = newInputVal;
+ numInput.dispatchEvent(new Event('change'));
}
})
});
Thanks for the useful widget.
I had to catch the input value change for the reaction in my script.
Unfortunately, the widget did not provide such functionality.
And I added it to the widget.