File tree Expand file tree Collapse file tree 1 file changed +12
-7
lines changed
src/Pages/GlobalConfigurations/BuildInfra Expand file tree Collapse file tree 1 file changed +12
-7
lines changed Original file line number Diff line number Diff line change @@ -35,10 +35,20 @@ const ProfileForm: FunctionComponent = () => {
35
35
[ profileInputErrors ] ,
36
36
)
37
37
38
+ const handleKeyDown = ( event : React . KeyboardEvent < HTMLFormElement > ) => {
39
+ if ( event . key === 'Enter' ) {
40
+ event . preventDefault ( )
41
+ }
42
+ }
43
+
38
44
const showActionItems = ! isLoading && ! responseError && profileInput ?. configurations
39
45
40
46
return (
41
- < form className = "h-100 flexbox-col build-infra pl pr pt pb dc__content-space bcn-0" onSubmit = { handleSubmit } >
47
+ < form
48
+ className = "h-100 flexbox-col build-infra pl pr pt pb dc__content-space bcn-0"
49
+ onKeyDown = { handleKeyDown }
50
+ onSubmit = { handleSubmit }
51
+ >
42
52
< div className = "flexbox-col dc__gap-24 pt pr pb pl h-100 dc__overflow-scroll" >
43
53
< BuildInfraDescriptor breadCrumbs = { breadcrumbs } />
44
54
@@ -67,12 +77,7 @@ const ProfileForm: FunctionComponent = () => {
67
77
</ div >
68
78
69
79
{ showActionItems && (
70
- < BuildInfraFooter
71
- disabled = { formErrorCount !== 0 }
72
- hideCancelButton
73
- editProfile
74
- loading = { loadingActionRequest }
75
- />
80
+ < BuildInfraFooter disabled = { formErrorCount !== 0 } editProfile loading = { loadingActionRequest } />
76
81
) }
77
82
</ form >
78
83
)
You can’t perform that action at this time.
0 commit comments