From e551d8efd8583dbcc5d1d4d85fcfa77dce15a463 Mon Sep 17 00:00:00 2001 From: Fredrik Strand Oseberg Date: Thu, 27 Jan 2022 16:42:04 +0100 Subject: [PATCH] fix: trim context field name (#634) --- frontend/src/component/context/ContextForm/ContextForm.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/frontend/src/component/context/ContextForm/ContextForm.tsx b/frontend/src/component/context/ContextForm/ContextForm.tsx index 52f16b8163..bfa34ad86f 100644 --- a/frontend/src/component/context/ContextForm/ContextForm.tsx +++ b/frontend/src/component/context/ContextForm/ContextForm.tsx @@ -104,7 +104,7 @@ const ContextForm: React.FC = ({ label="Context name" value={contextName} disabled={mode === 'Edit'} - onChange={e => setContextName(e.target.value)} + onChange={e => setContextName(trim(e.target.value))} error={Boolean(errors.name)} errorText={errors.name} onFocus={() => clearErrors()}