I am using React-Select because of its ability to enable users to filter the dropdown as they type. I need to add another functionality whereby based on another value of a dropdown, the next dropdown should be visible or hidden.
I am aware of how to pass in props from parent-child. What I am unable to figure out is how can i go about making that React-Select disappear? I checked the docs here and there is no such property.
I tried with manually editing the HTML attribute: display = "none" or "block", but it does not seem to change anything.
Here is how it looks like now:
<FormGroup row>
<Col md={6}>
<Select
placeholder={label}
name={fieldName}
onChange={method1}
options={options}
display="none" />
</Col>
</FormGroup>
I have found a work around this problem for those with similar situation as me, check it out here.