@storybook/components 6.5.0-alpha.18 → 6.5.0-alpha.19
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.
|
@@ -121,6 +121,13 @@ var NumberControl = function NumberControl(_ref) {
|
|
|
121
121
|
(0, _react.useEffect)(function () {
|
|
122
122
|
if (forceVisible && htmlElRef.current) htmlElRef.current.select();
|
|
123
123
|
}, [forceVisible]);
|
|
124
|
+
(0, _react.useEffect)(function () {
|
|
125
|
+
var newInputValue = typeof value === 'number' ? value : '';
|
|
126
|
+
|
|
127
|
+
if (inputValue !== newInputValue) {
|
|
128
|
+
setInputValue(value);
|
|
129
|
+
}
|
|
130
|
+
}, [value]);
|
|
124
131
|
|
|
125
132
|
if (!forceVisible && value === undefined) {
|
|
126
133
|
return /*#__PURE__*/_react.default.createElement(_form.Form.Button, {
|
|
@@ -81,6 +81,13 @@ export var NumberControl = function NumberControl(_ref) {
|
|
|
81
81
|
useEffect(function () {
|
|
82
82
|
if (forceVisible && htmlElRef.current) htmlElRef.current.select();
|
|
83
83
|
}, [forceVisible]);
|
|
84
|
+
useEffect(function () {
|
|
85
|
+
var newInputValue = typeof value === 'number' ? value : '';
|
|
86
|
+
|
|
87
|
+
if (inputValue !== newInputValue) {
|
|
88
|
+
setInputValue(value);
|
|
89
|
+
}
|
|
90
|
+
}, [value]);
|
|
84
91
|
|
|
85
92
|
if (!forceVisible && value === undefined) {
|
|
86
93
|
return /*#__PURE__*/React.createElement(Form.Button, {
|
|
@@ -43,6 +43,13 @@ export const NumberControl = ({
|
|
|
43
43
|
useEffect(() => {
|
|
44
44
|
if (forceVisible && htmlElRef.current) htmlElRef.current.select();
|
|
45
45
|
}, [forceVisible]);
|
|
46
|
+
useEffect(() => {
|
|
47
|
+
const newInputValue = typeof value === 'number' ? value : '';
|
|
48
|
+
|
|
49
|
+
if (inputValue !== newInputValue) {
|
|
50
|
+
setInputValue(value);
|
|
51
|
+
}
|
|
52
|
+
}, [value]);
|
|
46
53
|
|
|
47
54
|
if (!forceVisible && value === undefined) {
|
|
48
55
|
return /*#__PURE__*/React.createElement(Form.Button, {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@storybook/components",
|
|
3
|
-
"version": "6.5.0-alpha.
|
|
3
|
+
"version": "6.5.0-alpha.19",
|
|
4
4
|
"description": "Core Storybook Components",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"storybook"
|
|
@@ -41,9 +41,9 @@
|
|
|
41
41
|
},
|
|
42
42
|
"dependencies": {
|
|
43
43
|
"@popperjs/core": "^2.6.0",
|
|
44
|
-
"@storybook/client-logger": "6.5.0-alpha.
|
|
44
|
+
"@storybook/client-logger": "6.5.0-alpha.19",
|
|
45
45
|
"@storybook/csf": "0.0.2--canary.87bc651.0",
|
|
46
|
-
"@storybook/theming": "6.5.0-alpha.
|
|
46
|
+
"@storybook/theming": "6.5.0-alpha.19",
|
|
47
47
|
"@types/color-convert": "^2.0.0",
|
|
48
48
|
"@types/overlayscrollbars": "^1.12.0",
|
|
49
49
|
"@types/react-syntax-highlighter": "11.0.5",
|
|
@@ -77,6 +77,6 @@
|
|
|
77
77
|
"publishConfig": {
|
|
78
78
|
"access": "public"
|
|
79
79
|
},
|
|
80
|
-
"gitHead": "
|
|
80
|
+
"gitHead": "ce3592fc323ede3d33939b532ff7400cfdc1efa1",
|
|
81
81
|
"sbmodern": "dist/modern/index.js"
|
|
82
82
|
}
|