I wonder if anyone knows how to add an “all” selection in wix dropdown??
I know there’s a few codes out there in the forum but I do not know where to add it for it to function!
I’d be very grateful for a bit of help on this !! thanks.
Here is my code:
import wixData from 'wix-data';
export function searchclick(event) {
search();
$w("#repeater1").show();
}
function search() {
wixData.query("PropertiesCyprus")
.contains("country", String($w("#dropdown1").value))
.and(wixData.query("PropertiesCyprus").contains("cities", String($w("#dropdown2").value)))
.find()
.then(results => {
$w("#repeater1").data = results.items;
});
}
$w.onReady(function () {
});
export function dropdown1_change_1(event, $w) {
$w("#button33").show();
locationCityFilter();
}
function locationCityFilter (){
$w("#dropdown2").enable();
$w("#dataset4").setFilter( wixData.filter()
.eq("country", $w("#dropdown1").value)
);
}