react-typeahead
react-typeahead copied to clipboard
Clicking an element from the TypeaheadList not firing while showOptionsWhenEmpty
I am using [email protected] with 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.
Click on option not triggering the onOptionSelected, its weired its a basic features and its still open?