Basically I have a component that is a list of rooms that a user has joined. On top of this component there is a search section, and aside of the search input there are some options about the search, like search by "Room Name" , search by "Organization name " etc. I keep this options in objects inside of an array alongside the id of the option. Then I map this array to show all the options. Now I can display those options but I cant find a way to know which of those options the user has selected. The user has to select only one option and then the option is highlighted
This is the component
This is my code