know when datalist option was selected
assume I have the following;
How can I differentiate selecting the option
a
vs the user manually typing a
into the input? Is there a separate event to listen for, or maybe some additional data on the input elements input
or change
events?6 Replies
change will trigger when you select not when you type something in 🙂
input triggers in both cases
I thought change would still fire on blur if you've changed the value?
I did only small testing so I might be wrong 🙂
I didn't do any tbh 😄 I just vaguely remember using change for that an Age ago
thanks, I'll give it a go
"input" should trigger when typing