File tree Expand file tree Collapse file tree 3 files changed +19
-4
lines changed
ManagementSettingsPage/GroupsPage Expand file tree Collapse file tree 3 files changed +19
-4
lines changed Original file line number Diff line number Diff line change @@ -54,6 +54,7 @@ site/stats/
54
54
55
55
# direnv
56
56
.envrc
57
+ .direnv
57
58
* .test
58
59
59
60
# Loadtesting
Original file line number Diff line number Diff line change @@ -12,11 +12,15 @@ import { Stack } from "components/Stack/Stack";
12
12
import { type FormikTouched , useFormik } from "formik" ;
13
13
import type { FC } from "react" ;
14
14
import { useNavigate } from "react-router-dom" ;
15
- import { getFormHelpers , onChangeTrimmed } from "utils/formUtils" ;
15
+ import {
16
+ getFormHelpers ,
17
+ nameValidator ,
18
+ onChangeTrimmed ,
19
+ } from "utils/formUtils" ;
16
20
import * as Yup from "yup" ;
17
21
18
22
const validationSchema = Yup . object ( {
19
- name : Yup . string ( ) . required ( ) . label ( "Name" ) ,
23
+ name : nameValidator ( "Name" ) ,
20
24
} ) ;
21
25
22
26
export type CreateGroupPageViewProps = {
@@ -62,13 +66,16 @@ export const CreateGroupPageView: FC<CreateGroupPageViewProps> = ({
62
66
autoFocus
63
67
fullWidth
64
68
label = "Name"
69
+ onChange = { onChangeTrimmed ( form ) }
70
+ autoComplete = "name"
65
71
/>
66
72
< TextField
67
73
{ ...getFieldHelpers ( "display_name" , {
68
74
helperText : "Optional: keep empty to default to the name." ,
69
75
} ) }
70
76
fullWidth
71
77
label = "Display Name"
78
+ autoComplete = "display_name"
72
79
/>
73
80
< IconField
74
81
{ ...getFieldHelpers ( "avatar_url" ) }
Original file line number Diff line number Diff line change @@ -15,11 +15,15 @@ import { Spinner } from "components/Spinner/Spinner";
15
15
import { useFormik } from "formik" ;
16
16
import type { FC } from "react" ;
17
17
import { useNavigate } from "react-router-dom" ;
18
- import { getFormHelpers , onChangeTrimmed } from "utils/formUtils" ;
18
+ import {
19
+ getFormHelpers ,
20
+ nameValidator ,
21
+ onChangeTrimmed ,
22
+ } from "utils/formUtils" ;
19
23
import * as Yup from "yup" ;
20
24
21
25
const validationSchema = Yup . object ( {
22
- name : Yup . string ( ) . required ( ) . label ( "Name" ) ,
26
+ name : nameValidator ( "Name" ) ,
23
27
} ) ;
24
28
25
29
export type CreateGroupPageViewProps = {
@@ -69,13 +73,16 @@ export const CreateGroupPageView: FC<CreateGroupPageViewProps> = ({
69
73
autoFocus
70
74
fullWidth
71
75
label = "Name"
76
+ onChange = { onChangeTrimmed ( form ) }
77
+ autoComplete = "name"
72
78
/>
73
79
< TextField
74
80
{ ...getFieldHelpers ( "display_name" , {
75
81
helperText : "Optional: keep empty to default to the name." ,
76
82
} ) }
77
83
fullWidth
78
84
label = "Display Name"
85
+ autoComplete = "display_name"
79
86
/>
80
87
< IconField
81
88
{ ...getFieldHelpers ( "avatar_url" ) }
You can’t perform that action at this time.
0 commit comments