Skip to content

Commit

Permalink
fix: allow zero as a value for input field
Browse files Browse the repository at this point in the history
  • Loading branch information
flaminic committed Dec 4, 2024
1 parent 96572d2 commit b7c2e72
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion components/input/src/input-field/input-field.js
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,13 @@ class InputField extends React.Component {
onChange={onChange}
name={name}
type={type}
value={value || ''}
value={
value === null ||
value === undefined ||
Number.isNaN(value)
? ''
: value
}
placeholder={placeholder}
disabled={disabled}
max={max}
Expand Down

0 comments on commit b7c2e72

Please sign in to comment.