react-final-form
react-final-form copied to clipboard
useField throw error "Cannot read property 'active' of undefined"
Are you submitting a bug report or a feature request?
What is the current behavior?
For lazy initial value's field, I'm using the useField for register filed after API loaded. My code:
if (loading) return <Compo medias={some thing} />
Compo = (medias) => {
useField("attachmentFile", { initialValue: medias });
return null;
}
Error:
final-form.es.js:181 Uncaught (in promise) TypeError: Cannot read property 'active' of undefined
at publishFieldState (final-form.es.js:181)
at notifyField (final-form.es.js:739)
at notifyFieldListeners (final-form.es.js:750)
at notify (final-form.es.js:1082)
at afterPromise (final-form.es.js:712)
What is the expected behavior?
Sandbox Link
No
What's your environment?
Ubuntu
Other information
Thanks team