File tree Expand file tree Collapse file tree
src/components/SecretsTable Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -72,14 +72,20 @@ export const EditSecretDialog: FC<EditSecretDialogProps> = ({
7272 onOpenChange ( false )
7373 }
7474
75+ function handleFormSubmit ( e : React . FormEvent < HTMLFormElement > ) {
76+ e . preventDefault ( )
77+ e . stopPropagation ( )
78+ form . handleSubmit ( onSubmit ) ( e )
79+ }
80+
7581 return (
7682 < Dialog open = { open } onOpenChange = { handleDialogOpenChange } >
7783 < DialogContent className = "sm:max-w-[425px]" >
7884 < DialogHeader >
7985 < DialogTitle > Edit secret</ DialogTitle >
8086 </ DialogHeader >
8187 < DialogDescription className = "mb-6" > Please provide a new secret value.</ DialogDescription >
82- < form onSubmit = { form . handleSubmit ( onSubmit ) } className = "space-y-6" >
88+ < form onSubmit = { handleFormSubmit } className = "space-y-6" >
8389 < InputFormField control = { form . control } name = "name" label = "Name" disabled />
8490
8591 < InputFormField control = { form . control } name = "value" label = "Value" type = "password" />
You can’t perform that action at this time.
0 commit comments