From b0a4bf8fc4a0092e4e20a36462b17f8aea8da341 Mon Sep 17 00:00:00 2001 From: Justin Edmund Date: Mon, 20 Mar 2023 10:02:32 -0700 Subject: [PATCH] Change value in table fields * Input table fields need to be able to be empty * Slider table fields should default to 0 if value isn't provided --- components/InputTableField/index.tsx | 4 +++- components/SliderTableField/index.tsx | 2 +- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/components/InputTableField/index.tsx b/components/InputTableField/index.tsx index 4702cd64..5295f8a2 100644 --- a/components/InputTableField/index.tsx +++ b/components/InputTableField/index.tsx @@ -8,6 +8,7 @@ interface Props { name: string label: string description?: string + placeholder?: string value?: number className?: string imageAlt?: string @@ -42,8 +43,9 @@ const InputTableField = (props: Props) => { > diff --git a/components/SliderTableField/index.tsx b/components/SliderTableField/index.tsx index d26dd3c5..ff2409d2 100644 --- a/components/SliderTableField/index.tsx +++ b/components/SliderTableField/index.tsx @@ -58,7 +58,7 @@ const SliderTableField = (props: Props) => { min={props.min} max={props.max} step={props.step} - value={[value]} + value={[value ? value : 0]} onValueChange={handleValueChange} onValueCommit={handleValueCommit} />