i am trying to add a dependent drop down list where two drop down list needs to be shown to customer to choose from. 1st drop down list will be showing 8 state names and second drop down list showing city names. each states has numerous city name. Minimum city connected to any state are almost 142 and maximum is more than 5000. I copied a velo code from one free online coding team, it only works for row numbers less than 1000. I tried to edit this code to accomodate my large city names, but in vain. in my list, there are 15000 city names. Customer can select any state name such as ACT then second drop down will be enabled and showing 142 city names. if customer choose NSW then 2nd drop down will show 4500 city names to be choose from. I appreciate if someone assist to update this code for me. Unfortunately i am not highly experienced in velo coding.
// API Reference: Introduction - Velo API Reference - Wix.com
// “Hello, World!” Example: Velo Learning Center
import wixData from ‘wix-data’ ;
$w . onReady ( function () {
uniqueDropDown1 (); 
});
function uniqueDropDown1 ( ){
wixData . query ( "location" ) 
    . limit ( 1000 ) 
  . find () 
  . then ( results  => { 
       const  uniqueTitles  =  getUniqueTitles ( results . items ); 
       $w ( "#dropdown1" ). options  =  buildOptions ( uniqueTitles ); 
  }); 
function getUniqueTitles ( items ) {
    const  titlesOnly  =  items . map ( item  =>  item . state ); 
 **return**  [... **new**  Set ( titlesOnly )]; 
} 
function  buildOptions ( uniqueList ) { 
    **return**  uniqueList . map ( curr  => { 
        **return**  { label : curr ,  value : curr }; 
    }); 
} 
}
export function dropdown1_change ( event , $w ) {
uniqueDropDown2 ();
$w ( “#dropdown2” ). enable ();
}
function uniqueDropDown2 ( ){
wixData . query ( "location" ) 
    . contains ( "state" ,  $w ( "#dropdown1" ). value ) 
    . limit ( 1000 ) 
  . find () 
  . then ( results  => { 
       const  uniqueTitles  =  getUniqueTitles ( results . items ); 
       $w ( "#dropdown2" ). options  =  buildOptions ( uniqueTitles ); 
  }); 
function getUniqueTitles ( items ) {
    const  titlesOnly  =  items . map ( item  =>  item . city ); 
 **return**  [... **new**  Set ( titlesOnly )]; 
} 
function  buildOptions ( uniqueList ) { 
    **return**  uniqueList . map ( curr  => { 
        **return**  { label : curr ,  value : curr }; 
    }); 
} 
}
/**
- Adds an event handler that runs when the element is clicked.
Read more - @param {$w.MouseEvent} event
*/ 
/**

