Open inglesuniversal opened 2 years ago
I have noticed that when pressing the back space key on my computer all the way to leave the input field BLANK, which is used as part of the searchbox for autoComplete, I am inserting unwanted "undefined" values to the unordered list --->
<ul id="autoComplete_list_1" role="listbox" hidden=""> <li id="autoComplete_result_0" role="option"> <mark>un</mark>defined</li> <li id="autoComplete_result_1" role="option"> <mark>un</mark>defined</li> </ul>
At which part of the code, can I catch this and prevent it from populating the results?
document.querySelector("#autoComplete").addEventListener("close", function (event) { let value = event.detail.selection.value; });
Thanks so much @TarekRaafat
Hello @inglesuniversal,
Excuse my delayed response. I need more clarification.
undefined
Thanks! :)
I have noticed that when pressing the back space key on my computer all the way to leave the input field BLANK, which is used as part of the searchbox for autoComplete, I am inserting unwanted "undefined" values to the unordered list --->
At which part of the code, can I catch this and prevent it from populating the results?
Thanks so much @TarekRaafat