Skip to content

Commit

Permalink
make value optional for int component
Browse files Browse the repository at this point in the history
  • Loading branch information
aarron-lee committed Jan 15, 2024
1 parent 825afa4 commit f5d801b
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/components/HhdComponent.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -128,13 +128,15 @@ const HhdComponent: FC<HhdComponentType> = ({
) {
const value = get(state, `${statePath}`, defaultValue);

const valueProp = value ? { value } : {};

return (
<div>
<ErrorBoundary title={title}>
<FormLabel htmlFor={`${statePath}`}>{title}</FormLabel>
<NumberInput
id={`${statePath}`}
value={value}
{...valueProp}
onChange={(value) => {
if (updating) {
return;
Expand Down

0 comments on commit f5d801b

Please sign in to comment.