From 30d4019d7d950981b898a91bf1809159554ce83a Mon Sep 17 00:00:00 2001 From: Donkie Date: Tue, 10 Oct 2023 20:45:01 +0200 Subject: [PATCH] Number inputs now show error if bad value Previously it just prevented you from inputting it, which was a bit bad UX --- client/src/pages/filaments/create.tsx | 28 ++++++++++++++++++++------- client/src/pages/filaments/edit.tsx | 28 ++++++++++++++++++++------- 2 files changed, 42 insertions(+), 14 deletions(-) diff --git a/client/src/pages/filaments/create.tsx b/client/src/pages/filaments/create.tsx index 5667374..3d4a4bc 100644 --- a/client/src/pages/filaments/create.tsx +++ b/client/src/pages/filaments/create.tsx @@ -102,10 +102,12 @@ export const FilamentCreate: React.FC - + - + - + - + - + - + - + = () => { rules={[ { required: false, + type: "number", + min: 0, }, ]} > - + = () => { rules={[ { required: true, + type: "number", + min: 0, }, ]} > - + = () => { rules={[ { required: true, + type: "number", + min: 0, }, ]} > - + = () => { rules={[ { required: false, + type: "number", + min: 0, }, ]} > - + = () => { rules={[ { required: false, + type: "number", + min: 0, }, ]} > - + = () => { rules={[ { required: false, + type: "number", + min: 0, }, ]} > - + = () => { rules={[ { required: false, + type: "number", + min: 0, }, ]} > - +