Remove address list #26
Replies: 2 comments
-
const autocomplete = new Autocomplete("search", {...}; document.getElementById("search").addEventListener("keydown", function (e) {
if (e.key !== "Backspace") return;
if (e.target.value.length <= 1) {
autocomplete.destroy();
}
}); PS. You gave me the idea to add another parameter to the library that will clear the results when we do backpspace, whether the input field will be empty 😀 I need to analyze this. |
Beta Was this translation helpful? Give feedback.
-
Hi, thank you. if (onEvent.InAutoCompleteCondition) { Or onWatch: ( |
Beta Was this translation helpful? Give feedback.
-
Hi,
how remove address list, when I clear input field by keypress backspace?
Beta Was this translation helpful? Give feedback.
All reactions