Hi all,
I am new to this and am struggling with what is probably fairly simple code to setup a search for a Repeater that displays contents of a Dataset.
I've created the dataset and created a repeater that lists all the content/is connected. All I need now is a search box that searches the Name column of the dataset and displays the correct rows in the Repeater.
But - I'm struggling. I've read and watched many example but unfortunately can't get my head around it.
Here is my code, can anyone please advise where I'm going wrong?
import wixData from 'wix-data'; export function searchbutton_click(event) { wixData.query("Grammar Schools") .contains("title", $w("#searchbox").value) .find() .then(res => { $w("#repeater").rows = res.items; }); }
Thank you I'll do this right now
To begin with try changing your repeater line to this.
$w('#repeater').data = res.items;