@rc-component/trigger 1.13.3 → 1.13.4-0
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/es/index.js +2 -4
- package/lib/index.js +2 -4
- package/package.json +2 -2
package/es/index.js
CHANGED
|
@@ -185,12 +185,10 @@ export function generateTrigger() {
|
|
|
185
185
|
_React$useState10 = _slicedToArray(_React$useState9, 2),
|
|
186
186
|
inMotion = _React$useState10[0],
|
|
187
187
|
setInMotion = _React$useState10[1];
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
if (!mountRef.current || mergedOpen) {
|
|
188
|
+
useLayoutEffect(function (firstMount) {
|
|
189
|
+
if (!firstMount || mergedOpen) {
|
|
191
190
|
setInMotion(true);
|
|
192
191
|
}
|
|
193
|
-
mountRef.current = true;
|
|
194
192
|
}, [mergedOpen]);
|
|
195
193
|
var _React$useState11 = React.useState(null),
|
|
196
194
|
_React$useState12 = _slicedToArray(_React$useState11, 2),
|
package/lib/index.js
CHANGED
|
@@ -194,12 +194,10 @@ function generateTrigger() {
|
|
|
194
194
|
_React$useState10 = (0, _slicedToArray2.default)(_React$useState9, 2),
|
|
195
195
|
inMotion = _React$useState10[0],
|
|
196
196
|
setInMotion = _React$useState10[1];
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
if (!mountRef.current || mergedOpen) {
|
|
197
|
+
(0, _useLayoutEffect.default)(function (firstMount) {
|
|
198
|
+
if (!firstMount || mergedOpen) {
|
|
200
199
|
setInMotion(true);
|
|
201
200
|
}
|
|
202
|
-
mountRef.current = true;
|
|
203
201
|
}, [mergedOpen]);
|
|
204
202
|
var _React$useState11 = React.useState(null),
|
|
205
203
|
_React$useState12 = (0, _slicedToArray2.default)(_React$useState11, 2),
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@rc-component/trigger",
|
|
3
|
-
"version": "1.13.
|
|
3
|
+
"version": "1.13.4-0",
|
|
4
4
|
"description": "base abstract trigger component for react",
|
|
5
5
|
"engines": {
|
|
6
6
|
"node": ">=8.x"
|
|
@@ -66,7 +66,7 @@
|
|
|
66
66
|
"rc-align": "^4.0.0",
|
|
67
67
|
"rc-motion": "^2.0.0",
|
|
68
68
|
"rc-resize-observer": "^1.3.1",
|
|
69
|
-
"rc-util": "^5.
|
|
69
|
+
"rc-util": "^5.33.0"
|
|
70
70
|
},
|
|
71
71
|
"peerDependencies": {
|
|
72
72
|
"react": ">=16.9.0",
|