Open raduchiriac opened 8 years ago
I am using react-typeahead@2.0.0-alpha.5 with showOptionsWhenEmpty={true}.
react-typeahead@2.0.0-alpha.5
showOptionsWhenEmpty={true}
<Typeahead options={ this.props.availableSites } filterOption='name' displayOption='name' placeholder='Votre site...' onOptionSelected={this.onOptionSelected} ref='siteBox' value={this.state.nameSiteSelected} inputProps={{ style: S.typeahead.typeaheadInput }} customListComponent={ UI.TypeaheadList } showOptionsWhenEmpty={ true } />
When I focus my Typeahead, the three elements are displayed but clicking on any of them does not fire the onOptionSelected.
Only if I start typing in and select one of the results would work.
Workaround: change the onClick of the TypeaheadOption to onMouseDown.
onClick
TypeaheadOption
onMouseDown
Click on option not triggering the onOptionSelected, its weired its a basic features and its still open?
I am using
react-typeahead@2.0.0-alpha.5
withshowOptionsWhenEmpty={true}
.When I focus my Typeahead, the three elements are displayed but clicking on any of them does not fire the onOptionSelected.
Only if I start typing in and select one of the results would work.