Open jorri11 opened 11 months ago
Based on the comments in #174, I did this:
const autocompleteClearButton = document.querySelector('span.autocomplete-clear-button');
if (autocompleteClearButton)
autocompleteClearButton.click();
This requires the button to be enabled by setting the showClear
property.
I have bound a variable to selectedItem. When i clear the bound variable (set it to undefined or null) it does not reflect in the input field. Is there a way to clear it programatically? Reproduction here