dataSet Filter with a dropDown

I’m trying to set a repeater that takes data from a dataset. based on filtration from a dropdown.
Kindly I need a help me with my code it works for the selection “All”
but when choosing another value it doesn’t work.



import wixData from 'wix-data';
$w.onReady(function () {
 //wixData.query("Electronics_Laptops");
});

export function dropdown1_change(event, $w) {
    conditionFilteration($w("#dropdown1").value);
}
function conditionFilteration  (condition) {
 if (condition === "All") {
        $w("#dataset1").setFilter(wixData.filter());
    }
 else {
        $w("#dataset1").setFilter(wixData.filter().contains("Laptop_Condition", condition)); //database collection called "Electronics"
             //and Filtered filed is "Laptop_Condition"
    }
 }

Thanks for helping me.
Kindly I’m a beginner.

My friend, there are a tons of tutorials, examples, videos and same Forum-Posts about that.

Have a look here:
https://www.youtube.com/watch?v=Hx7_8-lRsW0&feature=youtu.be
https://support.wix.com/en/article/filtering-content-based-on-user-selection
https://support.wix.com/en/article/corvid-about-creating-searches-and-filters-of-displayed-data
https://support.wix.com/en/article/corvid-tutorial-adding-collection-data-search-functionality


there are of cours more…

Please have a deeper look, before we start helping you. It’s much easyier for you and me/us.

Good luck :wink:

PS: Thanks for using the Code-Block

I have been looking for one month for this problem. anyway thanks for replying :slight_smile: