Recently, I've started exploring React and now I'm eager to create a customized select
component similar to the one shown in this image: https://i.sstatic.net/D2IDC.png
I've successfully created a basic select
element like this:
<select >
<option value="volvo">Volvo</option>
</select>
However, I am facing a challenge when it comes to creating a dynamic select
that fetches its values from an object within this.state
. The structure of my state object is as follows:
state: { "first_one": "All accounts", "second_one": "second property", "third_one": "All Web Site Data"}
My goal is to display these values in a custom select format. When the user clicks on the select, I want to open a modal without displaying the dropdown list. Unfortunately, I am unsure how to implement this feature. Are there any libraries in reactJS
that could help me achieve this? I would greatly appreciate any guidance or solutions you can provide.