Sign in
Log inSign up

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

Hassle-free blogging platform that developers and teams love.
  • Docs by Hashnode
    New
  • Blogs
  • AI Markdown Editor
  • GraphQL APIs
  • Open source Starter-kit

© Hashnode 2024 — LinearBytes Inc.

Privacy PolicyTermsCode of Conduct