Greetings! I am in need of some assistance with my coding query. I have been working on a piece of code where selecting 'x' should reveal another dropdown, which seems to be functioning correctly. However, if I navigate three dropdowns deep and then select a different primary dropdown option, the previously displayed dropdown does not hide as expected.
For instance:
If you test the code snippet provided, you will notice that if you choose India, then Orissa, followed by Nal - but proceed to change India to America, Nal remains visible in the final dropdown. The same issue occurs if you initially select America - California - MRK or KRK.