Short question as I have been stuck with a small but annoying problem.
I have various filters (via dropdowns) which run queries in my database. When a filter selection returns zero results, a pop up window appears and the last selected filter is cleared. All this works fine, the issue is only when I reclick on the last selected filter, the option which I have previously selected is still shown. Any idea of how I can fully clear the dropdown, incl. the label. A photo and a small snipplet of my current code below. Many thanks for your support
wixWindow.openLightbox(“NoAvailability5”).then(() => {
if (lastSelectedFilter) {
// Reset the dropdown by clearing the selection
$w(lastSelectedFilter).value = null; // Clear the selected value
$w(lastSelectedFilter).resetValidityIndication(); // Clear any red frame
}