Hi I’m trying to tie different dropdowns with different sorting patterns I think I have something that could work but I’m not sure. if anyone wants to take a look at this and tell me what I’m doing wrong I would be really appreciative.
export function sortInput_change(event, $w) {
//Add your code for this event here:
if ($w(‘#sortInput’).value === “nameAtoZ”);
$w(“#dataset1”).setSort(wixData.sort()
.ascending(“title”))
if ($w(‘#sortInput’).value === “nameZtoA”); {
$w(“#dataset1”).setSort(wixData.sort()
.descending(“title”))
}
}