Skip to content
New issue

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

Fix TabbedForm Does not Display Errors in Hidden Tabs on Submit #5903

Merged
merged 2 commits into from Feb 15, 2021

Conversation

djhi
Copy link
Contributor

@djhi djhi commented Feb 12, 2021

No description provided.

@djhi djhi added the RFR Ready For Review label Feb 12, 2021
const formGroup = useFormGroup(value);
const form = useForm();
const [showError, setShowError] = React.useState(false);
form.subscribe(
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You must do that in a useEffect, and return the unsubscribe method

@fzaninotto fzaninotto merged commit 0859039 into master Feb 15, 2021
@fzaninotto fzaninotto deleted the fix-tabbedform-error-display-onsubmit branch February 15, 2021 11:50
@fzaninotto fzaninotto modified the milestones: 3.12.3, 3.12.4 Feb 15, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
RFR Ready For Review
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants