I have a repeater linked to a database collection and want to filter it using Check boxes. I want the filter selection check boxes to be on a light box so they do not clutter up the repeater page. I have the following code that works well on the repeater page but when i place this code on the light box it can not find the repeater because the repeater is not on the light box. Highlighted section is the problem. Is there some code I could put here to tell it to look for the repeater on another page?
import wixData from ‘wix-data’ ;
export function Filter1_click ( event ) {
search ();
}
function search () {
wixData . query ( "Trails" )
. contains ( “featureTag” , String ( $w ( “#checkboxFeature1” ). value ))
. and ( wixData . query ( “Trails” ). contains ( “routeTypeTag” , String ( $w ( “#checkboxTrailtype1” ). value )))
. find ()
. then ( results => {
$w ( “#repeatertrails” ). data = results . items ;
});
}