-
Notifications
You must be signed in to change notification settings - Fork 2
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: update form and make warnings and errors work #326
Conversation
malmen237
commented
Jan 28, 2025
(val) => val && val === currentValues[field] | ||
).length > 1; | ||
const validateFieldsGlobally = () => { | ||
const currentValues = watch(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
useWatch instead
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not possible in this use case
setWarning(newWarning); | ||
}; | ||
const validateFieldsLocally = (value: string, key: string) => { | ||
const currentValues = watch(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
same here
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not possible in this use case
} | ||
}; | ||
const updateFieldErrors = (field: keyof Hotkeys, value: string) => { | ||
const currentValues = watch(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
same here
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not possible in this use case