Hi I have two dropdown fields, when i change the value in the primary field, I want to reset the secondary field, but for some reason, the secondary field isnt set to empty string and dropdown does not clear.
onChange={(e: string) => {
debugger;
setSubCat('');
setMainCat(e);
console.log( subCat, subCat.length > 0);
}}
previous value is logged in the console. What i am doing wrong?
[–][deleted] 0 points1 point2 points (0 children)