top of page

Forum Posts

Catalina Torres
Apr 02, 2024
In Velo (Wix Code)
Hello friends, I am using a repeater, how can I hide and make it appear when I execute the "search" button function? My code is like this: import wixData from 'wix-data'; $w.onReady(function () { $w("#repeaterjd").onItemReady(($item, itemData, index) => { $item("#text27").text = itemData.ro; $item("#text28").text = itemData.vin; $item("#text29").text = itemData.licensePlate; $item("#text30").text = itemData.year; $item("#text31").text = itemData.make; }) async function search (){ const query = $w("#inputSearch").value; const roQuery = wixData.query("jdfulldata").contains("ro", query); const vinQuery = wixData.query("jdfulldata").contains("vin", query); const lpQuery = wixData.query("jdfulldata").contains("licensePlate", query); const jdQueryResult = await roQuery .or(vinQuery) .or(lpQuery) .find(); const jdfull = jdQueryResult.items; $w("#repeaterjd").data = jdfull; $w("#repeaterjd").expand; } $w("#buttonSearch").onClick(search); let throttle $w("#inputSearch").onInput(()=>{ clearTimeout(throttle); throttle = setTimeout(() => { search(); }, 500); }) });
How to hide repeaters before executing the query content media
0
1
11

Catalina Torres

More actions
bottom of page