Hello, I am in need of some help with my site below are the details:
Dataset has been sync to live
Using one dropdown list to filter a repeater
Using one button to submit
Using one button to reset
Works great on preview but not on publish site
I am currently working of the free site to build
import wixData from 'wix-data'; export function button9_click(event) { search(); } function search() { wixData.query("CovenantChurches") .contains("region", String($w("#dropdown1").value)) .find() .then(results => { $w("#repeater6").data = results.items; }); } /** * Adds an event handler that runs when the element is clicked. [Read more](https://www.wix.com/corvid/reference/$w.ClickableMixin.html#onClick) * @param {$w.MouseEvent} event */ export function resetbutton_click(event) { $w("#dataset1").setFilter(wixData.filter()) $w("#dropdown1").value = undefined; }
If your code is working but not on your live site, my first suggestion would be to check the collection permissions.
It also appears that you are attempting to use the wixData API on a dataset. Take a look at this documentation which may help and let me know how it goes.
Dataset API
Wix Data and Dataset Overview