yury-dymov / react-autocomplete-input

Autocomplete input field for React
https://yury-dymov.github.io/react-autocomplete-input/
MIT License
199 stars 65 forks source link

Bug: When using <div> instead of default <textarea> the @ is not triggered. #21

Closed kafeltz closed 6 years ago

kafeltz commented 6 years ago

When using Component param in the component consctructor like:

const textarea = (<div
    contentEditable="true"
    onInput={this.handleChange}
    onBlur={this.handleOnBlur}
    onFocus={this.handleOnFocus}
    dangerouslySetInnerHTML={{ __html: this.state.value }}
/>)

<TextInput Component={() => textarea} />

When pressing @ the popup is not triggered.

The ideia to use

instead of