# Dropdown 

**URL:** <https://forum.wixstudio.com/t/dropdown/39116>\
**Category:** Ask the community\
**Tags:** code, question\
**Created:** [June 3, 2018, 2:18pm UTC](https://forum.wixstudio.com/t/dropdown/39116 "2018-06-03T14:18:34Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![guideparishugoomar](https://avatars.discourse-cdn.com/v4/letter/g/4da419/32.png) [@guideparishugoomar](https://forum.wixstudio.com/u/guideparishugoomar)\
**Post date:** [June 3, 2018, 2:18pm UTC](https://forum.wixstudio.com/t/dropdown/39116/1 "2018-06-03T14:18:34Z")

</div>

Hello,

In the data base I have colomuns with value “yes” or “blank”  
I want to use a dropdown list and filter with values : "those title colomuns "  
and display on a repeater the results.  
I used this but it’s doesnt work.  
Thanks for your help.

**import** wixData **from** ‘wix-data’;

$w.onReady( **function** () {  
//TODO: import wixData from ‘wix-data’;  
});

export function categorie\_change() {  
wixData.query(‘Lieux’)  
.eq(‘#categorie.value’,‘yes’)  
.ascending(“lieu”)  
.find()  
.then(res =\> {  
$w(‘#repeater1’).data = res.items;  
});

}

---

<div class="post-metadata">

**Author:** ![yisrael-wix](https://sea1.discourse-cdn.com/wix/user_avatar/forum.wixstudio.com/yisrael-wix/32/1107_2.png) [@yisrael-wix](https://forum.wixstudio.com/u/yisrael-wix)\
**Post date:** [June 3, 2018, 2:22pm UTC](https://forum.wixstudio.com/t/dropdown/39116/2 "2018-06-03T14:22:21Z")

</div>

Hi John,

You need to implement an [onItemReady()](https://www.wix.com/code/reference/$w.Repeater.html#onItemReady) function for the Repeater.

Good luck,

Yisrael

---

<div class="post-metadata">

**Author:** ![guideparishugoomar](https://avatars.discourse-cdn.com/v4/letter/g/4da419/32.png) [@guideparishugoomar](https://forum.wixstudio.com/u/guideparishugoomar)\
**Post date:** [June 5, 2018, 2:33am UTC](https://forum.wixstudio.com/t/dropdown/39116/3 "2018-06-05T02:33:40Z")

</div>

Hello Yisrael,  
Thank you so much for your clue.  
I worked all day my repeater is workin and I can filter with multiples dropdown.  
but now I have 2 problems :

**1) How to clear Dropdown to original position ?**

```javascript
export function button1_click(event, $w) {
 //Add your code for this event here: 
    $w("#xxxx").selectedIndex = 0;
    $w("#yyyy").selectedIndex = 0;
    $w("#zzzz").selectedIndex = 0;
    $w("#aaaa").selectedIndex = 0;
 // add code for other dropdown selection menus
}

```

This code puts the dropdown back on the first value (of the sorted list without duplicates) and not on the original title of dropdown.

1. My second problem is this case :  
Let imagine we have :  
filter 1 with values : 1,2 or 3  
filter 2 : values A, B, C, D  
If I chose filter 1 value 1,  
For filter 2 : I only need to see value C and D concerned by my first choice of filter 1,

In case I dont find a solution users will finish with blank pages with no results according to a choice of two values on dropdowns that dont match.

Thank you in advance for your help.
