MCPcopy Index your code
hub / github.com/coder/coder / onChangeTrimmed

Function onChangeTrimmed

site/src/utils/formUtils.ts:90–95  ·  view source on GitHub ↗
(form: FormikContextType<T>, callback?: (value: string) => void)

Source from the content-addressed store, hash-verified

88
89export const onChangeTrimmed =
90 <T>(form: FormikContextType<T>, callback?: (value: string) => void) =>
91 (event: ChangeEvent<HTMLInputElement>): void => {
92 event.target.value = event.target.value.trim();
93 form.handleChange(event);
94 callback?.(event.target.value);
95 };
96
97// REMARK: Keep these consts in sync with coderd/httpapi/httpapi.go
98const maxLenName = 32;

Callers 15

formUtils.test.tsFile · 0.90
UpdateGroupFormFunction · 0.90
CreateGroupPageViewFunction · 0.90
EditUserFormFunction · 0.90
CreateUserFormFunction · 0.90
PasswordSignInFormFunction · 0.90
AccountFormFunction · 0.90
CreateTemplateFormFunction · 0.90
WorkspaceSettingsFormFunction · 0.90
SetupPageViewFunction · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected