The filtering select needs to warn users that they’re about to change the select and if they cancel, reset the value to the previous one.
- Am I connecting to the right events?
- The OnBlur event retriggers the change event. If the widget is still focused when I reset the value and you click anywhere outside the widget, it triggers the onchange event again. I’d like to prevent that. Is there a way to set the value but prevent the onChange from firing when blurring the input?
TLDR: Reset filteringSelect to old value and unfocus the widget using confirm dialog.
I’d missed the obvious fix – I was saving the old value in a local variable – if I’d compared it against the incoming value and halted the onChange functionality right there, it’d fix the onBlur problem.