Skip to content

Commit 47ebf2a

Browse files
committed
fix(InputField): min and max attrs only apply on type number
1 parent 0142fce commit 47ebf2a

File tree

1 file changed

+2
-2
lines changed
  • packages/orbit-components/src/InputField

1 file changed

+2
-2
lines changed

packages/orbit-components/src/InputField/index.tsx

+2-2
Original file line numberDiff line numberDiff line change
@@ -274,8 +274,8 @@ const InputField = React.forwardRef<HTMLInputElement, Props>((props, ref) => {
274274
defaultValue={defaultValue}
275275
placeholder={placeholder}
276276
disabled={disabled}
277-
min={minValue}
278-
max={maxValue}
277+
min={type === TYPE_OPTIONS.NUMBER ? minValue : undefined}
278+
max={type === TYPE_OPTIONS.NUMBER ? maxValue : undefined}
279279
minLength={minLength}
280280
maxLength={maxLength}
281281
ref={ref}

0 commit comments

Comments
 (0)