Skip to content

Commit c372dca

Browse files
committed
feat(ui): Focus the first editable field in all edit forms
Note that since the secret and infrastructure names cannot be changed with PATCH queries, in those edit forms the first editable field gets the focus. Signed-off-by: Jyrki Keisala <[email protected]>
1 parent 8c0f032 commit c372dca

File tree

7 files changed

+7
-7
lines changed

7 files changed

+7
-7
lines changed

ui/src/routes/_layout/organizations/$orgId/edit.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,7 @@ const EditOrganizationPage = () => {
119119
render={({ field }) => (
120120
<FormItem>
121121
<FormLabel>Name</FormLabel>
122-
<FormControl>
122+
<FormControl autoFocus>
123123
<Input {...field} />
124124
</FormControl>
125125
<FormDescription>

ui/src/routes/_layout/organizations/$orgId/infrastructure-services/$serviceName/edit.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -167,7 +167,7 @@ const EditInfrastructureServicePage = () => {
167167
render={({ field }) => (
168168
<FormItem>
169169
<FormLabel>Url</FormLabel>
170-
<FormControl>
170+
<FormControl autoFocus>
171171
<Input {...field} type='url' />
172172
</FormControl>
173173
<FormDescription>

ui/src/routes/_layout/organizations/$orgId/products/$productId/edit.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -118,7 +118,7 @@ const EditProductPage = () => {
118118
render={({ field }) => (
119119
<FormItem>
120120
<FormLabel>Name</FormLabel>
121-
<FormControl>
121+
<FormControl autoFocus>
122122
<Input {...field} />
123123
</FormControl>
124124
<FormDescription>

ui/src/routes/_layout/organizations/$orgId/products/$productId/repositories/$repoId/edit.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -138,7 +138,7 @@ const EditRepositoryPage = () => {
138138
render={({ field }) => (
139139
<FormItem>
140140
<FormLabel>URL</FormLabel>
141-
<FormControl>
141+
<FormControl autoFocus>
142142
<Input {...field} />
143143
</FormControl>
144144
<FormDescription>URL of the repository</FormDescription>

ui/src/routes/_layout/organizations/$orgId/products/$productId/repositories/$repoId/secrets/$secretName/edit.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -152,7 +152,7 @@ const EditRepositorySecretPage = () => {
152152
render={({ field }) => (
153153
<FormItem className='mt-0'>
154154
<FormLabel>Value</FormLabel>
155-
<FormControl>
155+
<FormControl autoFocus>
156156
<Input {...field} />
157157
</FormControl>
158158
<FormDescription>

ui/src/routes/_layout/organizations/$orgId/products/$productId/secrets/$secretName/edit.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -148,7 +148,7 @@ const EditProductSecretPage = () => {
148148
render={({ field }) => (
149149
<FormItem className='mt-0'>
150150
<FormLabel>Value</FormLabel>
151-
<FormControl>
151+
<FormControl autoFocus>
152152
<Input {...field} />
153153
</FormControl>
154154
<FormDescription>

ui/src/routes/_layout/organizations/$orgId/secrets/$secretName/edit.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -149,7 +149,7 @@ const EditOrganizationSecretPage = () => {
149149
render={({ field }) => (
150150
<FormItem className='mt-0'>
151151
<FormLabel>Value</FormLabel>
152-
<FormControl>
152+
<FormControl autoFocus>
153153
<Input {...field} />
154154
</FormControl>
155155
<FormDescription>

0 commit comments

Comments
 (0)