react-textselect
react-textselect copied to clipboard
Active selection should be by name, not numerical index
Hi there,
I noticed with this plugin, you need to specify:
options={['option0', 'option1', 'option2']}
active={this.state.selectedOption}
Here, you actually need to specify the numerical INDEX of the selection you want, which means I need to do some funky logic to get the indices at runtime. It would be much nicer if I could specify instead "option1" instead of "1" as the active entry here instead.