-
Notifications
You must be signed in to change notification settings - Fork 579
Open
Description
When integrated with react-typed component, this throws an error, when selecting a suggestion, at the time the input should be re-focused
Cannot read property 'focus' of undefined
On this line
- Working with a simple wrapper div : https://codepen.io/anon/pen/EoBZrR
- Not working when wrapped inside a react-typed component : I did not manage to import react-typed inside codepen to demonstrate
npm install --save react-typed
Import Typed component
import Typed from 'react-typed'
then replace readerInputComponent with the following
renderInputComponent={(inputProps) => {
return (
<Typed
strings=[
'This is an example'
]
attr="placeholder"
loop
>
<input
{...inputProps}
/>
</Typed>
)
}}
Steps
- Focus on the input field
- Type
c, and wait for suggestions to appear - Choose a suggestion by clicking on it
- Observe console
Observed behaviour: Input keeps blurred and an error is thrown
Expected behaviour: Input should be re-focused
I am aware this is not a trouble with the library itself, but I'm posting here to get help :)
I tried to digg into the lib to see what happens :
Which lead me to https://github.com/moroshko/react-autowhatever
I'm lost at this point
Metadata
Metadata
Assignees
Labels
No labels