In my current setup, I have 3 dropdowns on the page. When I click outside of any dropdown, they are correctly closed. However, if one dropdown is already open and I click on another one, the previously opened dropdown remains open. I want all dropdowns to close whenever I click on a new one, regardless of whether they are already open. How can I achieve this desired behavior?
Here's a demo of the issue I'm experiencing: https://stackblitz.com/edit/github-mxncy7?file=src%2Findex.css