How to add the code for show 'All type' in dropdown?

Hello!!!
My dropdown list has “typeA, typeB, typeC, typeD - typeZ”

HERE IS THE CODE

import wixData from “wix-data”;
export function dropdown2_change(event, $w) {
wixData.query(‘MediaNews’)
.contains(‘typeTh’, $w(‘#dropdown2’).value)
.find() // Run the query
.then(res => {
// Set the table data to be the results of the query
$w(‘#table1’).rows = res.items;
});
}

+++ ### +++ And now I already add “All Type” on the first list in dropdown.
but I don’t know how to add the code for it.
Can you please tell me how, Thank you. ^^

In the code where you build your dropdown option list, after the list is built you can all an “All” option to your dropdown like this:

optionsList.unshift({
 "value": '',
 "label": 'All'
});

I did not built dropdown list from the code, but i build it from the manage table on dropdown tool.

Then you can do this to reset the dropdown:

$w('#dropdown2').placeholder = 'All';
$w('#dropdown2').value = null;

I’m not sure that I put it correct. It doesn’t work.

export function dropdown2_change(event, $w) {
// Runs a query on the “Members” collection
wixData.query(‘MediaNews’)
// Query the collection for any items whose “Name” field contains
// the value the user selected in the dropdown
.contains(‘typeTh’, $w(‘#dropdown2’).value)
.find() // Run the query
.then(res => {
// Set the table data to be the results of the query
$w(‘#table1’).rows = res.items;
$w(‘#dropdown2’).placeholder = ‘All ‘;
$w(’#dropdown2’).value = null ;
});
}