Dropdown - only 50 results are shown instead of 450

using the selection filter below shows only 50 results instead of 450, do you know what is wrong?

$w . onReady ( async () => {

    $w ( "#dropdown5" ). options  =  **await**  poppulateDropdown ( "Klienci" ); 

});

export function poppulateDropdown ( collectionName ) {
let allItems = ;
return wixData . query ( collectionName )
. ascending ( “nazwaFirmy” )
. find ()
. then (( results ) =>{
if ( results . totalCount > 0 ) {
let items = results . items ;
items . forEach (( item ) =>{
let oneItem = {
label : item . nazwaFirmy ,
value : item . nip
}
allItems . push ( oneItem );
})
return allItems ;
}
return null ;
})

}

After the .ascending and before the .find you need to add the following

.limit(450)

You can change the number up to 1000.

The default is 50 hence the reason why only 50 results are shown in the dropdown

Thank you very much, problem solved

1 Like