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
This commit is contained in:
Justin Edmund 2023-03-20 10:02:32 -07:00
parent 84e7fc5ffc
commit d0c1f07422
2 changed files with 3 additions and 2 deletions

View file

@ -43,8 +43,9 @@ const InputTableField = (props: Props) => {
>
<Input
className="Bound"
placeholder={props.placeholder}
type="number"
value={`${value}`}
value={value ? `${value}` : ''}
step={1}
onChange={onInputChange}
/>

View file

@ -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}
/>