search bar synchronization filter .... how???

Hello dear WIX genius.

I need your help, please.

I wrote this code that I found on youtube to create a search bar that consists of an input field and two dropdowns.

Problem: No search synchronization between the three search fields or repeater filters. Each field works alone.

I want the three input fields to filter the repeater (connected to a database) at the same time.

what do I need to change in my code ???

import wixdata from 'wix-data';
let debounceTimer;
export function input24_keyPress_1(event)
{
if (debounceTimer) {
clearTimeout (debounceTimer);
debounceTimer = undefined;
}
debounceTimer = setTimeout(()=> {
filter($w("#input24").value);
} , 20);
let lastFilterTitle;
function filter(title){
if (lastFilterTitle !== title) {
$w('#dataset1').setFilter(wixdata.filter().contains('raisonSocial',title));
lastFilterTitle = title;
}
}}
export function dropdown1_change(event) {
filter1($w("#dropdown1").value);
}
function filter1(dropdown1){
$w('#dataset1').setFilter(wixdata.filter().contains('categorie',dropdown1));
}
export function dropdown3_change(event) {
filter2($w("#dropdown3").value);
}
function filter2(dropdown3){
$w('#dataset1').setFilter(wixdata.filter().contains('gouvernorat',dropdown3));
}

thank you in advance for your help…

Hi,

You can create the same functionality using a step by step tutorial created by Wix. Please see here .

thank you for your feedback.
Actually I’m still a beginner in programming can you help me more please.