From b623958563382bb1dbd3dc6ec386df654ac47162 Mon Sep 17 00:00:00 2001 From: dario platania Date: Tue, 6 Dec 2022 21:04:34 +0100 Subject: [PATCH] fix(NumberInput.js): assign min and max value to default props (#12768) Co-authored-by: TJ Egan --- .all-contributorsrc | 9 +++++++++ README.md | 1 + packages/react/src/components/NumberInput/NumberInput.js | 4 ++-- 3 files changed, 12 insertions(+), 2 deletions(-) diff --git a/.all-contributorsrc b/.all-contributorsrc index aea1403ada16..c7e861f5680a 100644 --- a/.all-contributorsrc +++ b/.all-contributorsrc @@ -968,6 +968,15 @@ "contributions": [ "code" ] + }, + { + "login": "darioplatania", + "name": "dario platania", + "avatar_url": "https://avatars.githubusercontent.com/u/11682859?v=4", + "profile": "http://darioplatania.github.io/", + "contributions": [ + "code" + ] } ], "commitConvention": "none" diff --git a/README.md b/README.md index bb668a4e8d39..88836687934e 100644 --- a/README.md +++ b/README.md @@ -211,6 +211,7 @@ check out our [Contributing Guide](/.github/CONTRIBUTING.md) and our
ShankarV-CodeJunkie

💻 +
dario platania

💻 diff --git a/packages/react/src/components/NumberInput/NumberInput.js b/packages/react/src/components/NumberInput/NumberInput.js index 68897418da7b..cb8445630fa2 100644 --- a/packages/react/src/components/NumberInput/NumberInput.js +++ b/packages/react/src/components/NumberInput/NumberInput.js @@ -42,8 +42,8 @@ const NumberInput = React.forwardRef(function NumberInput(props, forwardRef) { invalid = false, invalidText = enabled ? undefined : 'Provide invalidText', light, - max, - min, + max = 100, + min = 0, onChange, onClick, onKeyUp,