Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # 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
Collaborator

@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
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
RFR Ready For Review
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants