react-typeahead icon indicating copy to clipboard operation
react-typeahead copied to clipboard

Clicking an element from the TypeaheadList not firing while showOptionsWhenEmpty

Open raduchiriac opened this issue 9 years ago • 2 comments

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.

raduchiriac avatar Nov 23 '16 11:11 raduchiriac

Workaround: change the onClick of the TypeaheadOption to onMouseDown.

AntiPaste avatar Feb 09 '17 13:02 AntiPaste

Click on option not triggering the onOptionSelected, its weired its a basic features and its still open?

sushilnykaa avatar May 13 '17 10:05 sushilnykaa