Skip to content

Commit edb8aa2

Browse files
committed
fix group
1 parent 30b0620 commit edb8aa2

File tree

2 files changed

+2
-13
lines changed

2 files changed

+2
-13
lines changed

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "rc-tween-one",
3-
"version": "3.0.0-beta.19",
3+
"version": "3.0.0-beta.20",
44
"description": "tween-one anim component for react",
55
"typings": "es/index.d.ts",
66
"engines": {

src/TweenOneGroup.tsx

Lines changed: 1 addition & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -181,20 +181,9 @@ const TweenOneGroup: TweenOneGroupRef = React.forwardRef<any, IGroupProps>((prop
181181
if (oneEnter.current) {
182182
const nextChild = toArrayChildren(props.children).filter((c) => c);
183183
const currentChild = toArrayChildren(currentChildren.current);
184-
// 不计入正在进场的元素又进场;
185-
const newNextChild = nextChild.filter(
186-
(c) =>
187-
c &&
188-
!(
189-
currentChild.find((d) => d && d.key === c.key) &&
190-
keysToEnter.current.indexOf(c.key) >= 0
191-
),
192-
);
193184
// 如果还在动画,暂存动画队列里,等前一次动画结束后再启动最后次的更新动画
194185
if (Object.keys(isTween.current).length && !exclusive) {
195-
if ((nextChild.length && newNextChild.length) || !nextChild.length) {
196-
animQueue.current.push(newNextChild);
197-
}
186+
animQueue.current.push(nextChild);
198187
} else {
199188
setChild(changeChildren(nextChild, currentChild));
200189
}

0 commit comments

Comments
 (0)