-
Hello,
When you click on the selected suggestion, nothing happen (the list disappear but the text is not appended to the textarea). Something is missing somewhere I guess. Or is this the basic way of working? Regards |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments 1 reply
-
Yes, that example is "missing" (it's not really meant to be a complete example) listening to the selection event, like $("autoComplete").addEventListener("selection", ev => { ... }) In that handler you can do |
Beta Was this translation helpful? Give feedback.
-
Hello @moskito, As @folknor thankfully mentioned that that example // Config Options
events: {
input: {
selection: (event) => {
const feedback = event.detail;
// Prepare User's Selected Value
const selection = feedback.selection.value[feedback.selection.key];
// Replace Input value with the selected value
autoCompleteJS.input.value = selection;
},
},
}, Please let me know if you have any questions, and regarding the complete code of the example, I will make sure to add it. Have a nice day all! :) |
Beta Was this translation helpful? Give feedback.
-
Thanks to both of you. @TarekRaafat: thanks for all the time spent on this project :) |
Beta Was this translation helpful? Give feedback.
Yes, that example is "missing" (it's not really meant to be a complete example) listening to the selection event, like
In that handler you can do
$("autoComplete").value = ev.detail.selection.value
or equivalent.