@bitrise/bitkit 12.11.0 → 12.11.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@bitrise/bitkit",
3
3
  "description": "Bitrise React component library",
4
- "version": "12.11.0",
4
+ "version": "12.11.1",
5
5
  "repository": "git@github.com:bitrise-io/bitkit.git",
6
6
  "main": "src/index.ts",
7
7
  "license": "UNLICENSED",
@@ -126,7 +126,7 @@ const Input = forwardRef<InputProps, 'div'>((props, ref) => {
126
126
  const RightContentWrapper = rightAddonPlacement === 'inside' ? InputRightElement : InputRightAddon;
127
127
  const inputRightPadding = rightIconName || (rightAddon && rightAddonPlacement === 'inside') ? '43px' : '11px';
128
128
 
129
- const [valueLength, setValueLength] = useState(0);
129
+ const [valueLength, setValueLength] = useState(value?.toString().length || 0);
130
130
 
131
131
  const onInputChange = (e: ChangeEvent<HTMLInputElement>) => {
132
132
  setValueLength(e.currentTarget.value.length);
@@ -77,7 +77,7 @@ const Textarea = forwardRef<TextareaProps, 'div'>((props, ref) => {
77
77
  value,
78
78
  };
79
79
 
80
- const [valueLength, setValueLength] = useState(0);
80
+ const [valueLength, setValueLength] = useState(value?.toString().length || 0);
81
81
 
82
82
  const onTextareaChange = (e: ChangeEvent<HTMLTextAreaElement>) => {
83
83
  setValueLength(e.currentTarget.value.length);