File tree Expand file tree Collapse file tree 1 file changed +8
-1
lines changed
apps/meteor/client/views/room/contextualBar/NotificationPreferences Expand file tree Collapse file tree 1 file changed +8
-1
lines changed Original file line number Diff line number Diff line change @@ -32,8 +32,15 @@ const NotificationPreferences = ({
3232 const { t } = useTranslation ( ) ;
3333 const {
3434 formState : { isDirty, isSubmitting } ,
35+ reset,
36+ getValues,
3537 } = useFormContext ( ) ;
3638
39+ function handleSaveHandler ( ) {
40+ handleSave ( ) ;
41+ reset ( getValues ( ) ) ;
42+ }
43+
3744 return (
3845 < >
3946 < ContextualbarHeader >
@@ -47,7 +54,7 @@ const NotificationPreferences = ({
4754 < ContextualbarFooter >
4855 < ButtonGroup stretch >
4956 { handleClose && < Button onClick = { handleClose } > { t ( 'Cancel' ) } </ Button > }
50- < Button primary disabled = { ! isDirty } loading = { isSubmitting } onClick = { handleSave } >
57+ < Button primary disabled = { ! isDirty } loading = { isSubmitting } onClick = { handleSaveHandler } >
5158 { t ( 'Save' ) }
5259 </ Button >
5360 </ ButtonGroup >
You can’t perform that action at this time.
0 commit comments