Filtering Contect

Hi

I am creating a page for rents, on the search page I have some dropdowns

Is there any way to program that when selecting one, the repeater will show the results, but then based on the results if another dropdown is selected it will show the new results?

For example, if I choose Property Type = House then I can choose Number of rooms and I filter the houses + that number of rooms.

I have this code:
export function dropdown1_change (event) {
let proptype = $ w (“# dropdown1”). value;
$ w (“# dataset1”). setFilter (wixData.filter (). contains (“propType”, proptype));
}

export function dropdown2_change (event) {
let beds = $ w (“# dropdown2”). value;
$ w (“dataset1”). setFilter (wixData.filter (). contains (“bedrooms”, beds));
}

But in the second function it says that “Dataset1” is not a valid selector

I’m not sure but it seems you missing the symbol # in the second function ))

Yes, I already noticed, with that it no longer shows the error

But how can I do to join those functions?

if I choose one, and then I want to choose another, it only shows me the results of the last one and deletes those of the first one

Can I link them with some kind of function “and”?