We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
I have a validation error disabled submit button - when inside a <Form>, it will be disabled (upon the first error #98).
<Form>
When using a <FormContext>, necessary due to the structure of the UI components, it doesn't receive notices of the error.
<FormContext>
Submit:
import React from 'react'; import Form from 'react-formal'; export default function Submit(props) { return ( <Form.Trigger group="@all"> {({ messages }) => <Form.Button {...props} type='submit' disabled={!!Object.keys(messages).length} /> } </Form.Trigger> ); }
Here is an abbreviated sample (the real structure is a bit of a composite for reuse):
const schema = yup.object({ first_name: yup.string().default('').required() }) <FormContext> <Card> <Content> <Form schema={schema}> <Field name='first_name' /> </Form> </Content> <Actions> <Submit>Submit</Submit> </Actions> </Card> </FormContext>
The text was updated successfully, but these errors were encountered:
hmm this is kinda tough to fix give how errorupdates propagate... at a glance I'm not sure how to fix this, but it probably should be fixed
Sorry, something went wrong.
No branches or pull requests
I have a validation error disabled submit button - when inside a
<Form>
, it will be disabled (upon the first error #98).When using a
<FormContext>
, necessary due to the structure of the UI components, it doesn't receive notices of the error.Submit:
Here is an abbreviated sample (the real structure is a bit of a composite for reuse):
The text was updated successfully, but these errors were encountered: