I have this code working perfectily for searching database with a click
import wixData from “wix-data” ;
$w . onReady ( function () {
});
export function searchbutton_click ( event ) {
wixData . query ( “Tracking” )
. eq ( “title” , $w ( “#trackinginput” ). value . toUpperCase ())
. find () // Run the query
. then ( res => {
if ( res . items . length > 0 ) {
$w ( “#noItemsText” ). collapse ();
$w ( "#repeater1" ). data = res . items ;
$w ( "#repeater1" ). expand ();
}
else {
$w ( “#repeater1” ). collapse ();
$w ( "#noItemsText3" ). expand ();
}
}
);
}
I would like to have the option of seaching with the “enter key” too, ie to have both, but have no idea where to go from here.
Its running on http://ojizo.coffee/ojizo10percent
You can see a displayed result using “0001”
Any help would be greatly appeciated.
Stephen