Open Mr-Wallet opened 9 years ago
Also having this issue.
This seems to work fine on tokenizer though.
I'm experiencing this as well
I was experiencing this until i removed defaultValue=""
from the component props.
@fmoo Is there any chance you could take a look at the above PR which fixes this issue?
When constructing a Typeahead with an array of strings as the object, each change brings up a list of options reflecting the input node's value before the change.
Based on stepping through, it seems to be because
componentWillReceiveProps
is usingthis.state.entryValue
to calculate the options, but thesetState({entryValue})
in_onTextEntryUpdated
hasn't yet been put intothis.state
at that point. As a result, even though the correct options are calculated in_onTextEntryUpdated
, they're instantly overridden before the render occurs by a recalculation incomponentWillReceiveProps
using the previous state.