Suggestion: New Event For Datalist Selection #455
Replies: 2 comments 1 reply
-
Thanks for reporting. I think you're right, you have to check the input against the options in the datalist like this: https://codepen.io/bsmth/pen/oNrXxmK?editors=1111 based on https://developer.mozilla.org/en-US/docs/Web/HTML/Element/datalist This might be something for spec authors as we're not writing specifications, we're documenting them and showing how developers can use features that they describe. I hope that helps! |
Beta Was this translation helpful? Give feedback.
-
I'm closing this now, but if you think that's a mistake, feel free to reply. You're also welcome to join our Discord if you'd prefer to chat with us more about it. Thank you :) |
Beta Was this translation helpful? Give feedback.
-
When using
<datalist>
you can make it appear withshowPicker()
. However, when a user selects a value from it, there is no event to know that, correct?Of course, you can check on input if the value matches one of the ones in the datalist, but you won't know if the user just typed it in and wants to continue typing (partial match with datalist entry) or if the user clicked on a datalist entry and now is a bit frustrated because nothing happens and he has to click again for the search to perform.
Beta Was this translation helpful? Give feedback.
All reactions