I have a form where the user can choose a country from a list (autocomplete), and when the user selects a country, it’s respective regions (cities or states) will appear in another autocomplete with multiple options so the user can select multiple regions. The problem is, I should show multiple of these 2 lists when the user clicks on the ‘add’ FAB, so the user can choose to add another country with it’s regions to choose from. The useState of regions duplicate the regions in the console log. How can I solve this? Or is there a better way to handle this form, a better design maybe?
Here’s the codesandbox link to better demonstrate the issue:
https://codesandbox.io/p/sandbox/mui-5-forked-msf5fs
Thanks in advance…