Dropdown doesn't work for multilingual repeater

I’ve added a dropdown menu connected to a repeater, it works perfectly.

Mine is a multilingual site, so I’ve added a language column in my content manager, and the following coding to filter the right content per language.

import wixWindow from 'wix-window'; 
import wixData from 'wix-data'; 
import {session} from 'wix-storage'; 
import wixLocation from 'wix-location'; 

$w.onReady(function () { 

let locale = wixWindow.multilingual.currentLanguage; // "en-US" 

if (locale === "en"){ 
// $w('#dataset1').setFilter( wixData.filter().eq("language", "EN")); 
    $w("#dataset1").setFilter(wixData.filter() .contains("language", "EN")); 
    $w('#offerCategory').text = "Offer Category"; 
    $w('#hotel').text = "Hotel"; 
    $w('#validity').text = "Validity"; 
    $w('#descriptions').label = "Descriptions"; 
    $w('#rate').label = "Rate"; 
    $w('#ctaButton').label = "CTA Button"; 
    $w('#landingUrl').label = "Landing URL"; 

 } else { 
    $w("#dataset1").setFilter(wixData.filter() 
.contains("language", "TC")); 

 } 

});

The content display looks fine but the dropdown menu no longer works. Am I missing any codes? Much appreciated if someone here can shed lights, thanks in advance!

If possible, please post your site URL so people can test it out :slight_smile:

Also, put the code in

this code block!!!

and I don’t see any code you added for the ‘Dropdown’ element… is that the full code?

  • Certified Code :hong_kong:

https://www.wix.com/velo/example/search-a-database
Try filter the database with the dropdown with code, instead of directly link with the dataset element