You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
it('should have derived state on first render given defaultMeta', () => {
const form = new FormApi({
defaultValues: {
name: '',
},
})
form.mount()
const nameField = new FieldApi({
form,
name: 'name',
defaultMeta: {
errorMap: {
onChange: 'THERE IS AN ERROR',
},
},
})
nameField.mount()
expect(nameField.getMeta().errors).toEqual(['THERE IS AN ERROR'])
})
Because onUpdate only triggers when you actually update the state, not in the constructor.
The text was updated successfully, but these errors were encountered:
This test fails:
Because
onUpdate
only triggers when you actually update the state, not in theconstructor
.The text was updated successfully, but these errors were encountered: