My FeedDiscussionsHeadless CMS
New
Sign in
Log inSign up
Learn more about Hashnode Headless CMSHashnode Headless CMS
Collaborate seamlessly with Hashnode Headless CMS for Enterprise.
Upgrade ✨Learn more

How to Implement multiple select dropdown component in a parent component in React and sync those values between select component?

Sonu Sasankan's photo
Sonu Sasankan
·Feb 17, 2019

I have a requirement that I need multiple select dropdown in a parent component and When I select a option in any of them, it should be removed from rest of the select dropdowns except the current one which I selected. Also should be able to reselect the option after I selected any option.

I have Implemented a basic logic but it has some issues. Can anyone help me to resolve the problem?

I have given Codesandbox URL:

Code sandbox link