Hi! Thank you in advance!
Situation:
I have a text input and a repeater linked to a database.
Results are shown when something typed matches a database element.
On every result there’s a button linked to its URL from the database.
If user wants to stop the query he should be able to end the query and make the repeater hide.
Note 1: I don’t want to use the page.onClick() beacuse I would get the annoying clickable cursor all over the page.
Note 2: I would use the searchbar.onBlur() as it’s meant to do that…Right(?)
Issue:
The onBlur function works if user click on the page background but ALSO when clicking on the repeater button instead of redirecting to the element page.
Any suggestion? (I know it can be done 'cause it worked 2 weeks ago before changes have been made - no restore possibility with the website history.) Thank you again
export function input1_keyPress(event, $w) {
let SearchValue = $w("#input1").value;
$w("#dataset1").setFilter(wixData.filter().contains('title',SearchValue));
if(SearchValue === "" || event.key === "Escape" || event.key === "Delete")
$w('#repeater1').hide();
else $w('#repeater1').show();
}