mirror of
https://github.com/grafana/grafana.git
synced 2025-02-12 08:35:43 -06:00
PublicDashboards: Email validation on submit (#64238)
This commit is contained in:
parent
e5870aa4f1
commit
498d7ae914
@ -116,14 +116,14 @@ export const EmailSharingConfiguration = () => {
|
||||
control,
|
||||
watch,
|
||||
handleSubmit,
|
||||
formState: { isValid, errors },
|
||||
formState: { errors },
|
||||
reset,
|
||||
} = useForm<EmailSharingConfigurationForm>({
|
||||
defaultValues: {
|
||||
shareType: publicDashboard?.share || PublicDashboardShareType.PUBLIC,
|
||||
email: '',
|
||||
},
|
||||
mode: 'onChange',
|
||||
mode: 'onSubmit',
|
||||
});
|
||||
|
||||
const onShareTypeChange = (shareType: PublicDashboardShareType) => {
|
||||
@ -186,7 +186,7 @@ export const EmailSharingConfiguration = () => {
|
||||
<Button
|
||||
type="submit"
|
||||
variant="primary"
|
||||
disabled={!isValid || isAddEmailLoading}
|
||||
disabled={isAddEmailLoading}
|
||||
data-testid={selectors.EmailSharingInviteButton}
|
||||
>
|
||||
Invite {isAddEmailLoading && <Spinner />}
|
||||
|
Loading…
Reference in New Issue
Block a user