diff --git a/packages/dev/inspector/src/components/actionTabs/tabs/propertyGrids/animations/animationGroupPropertyGridComponent.tsx b/packages/dev/inspector/src/components/actionTabs/tabs/propertyGrids/animations/animationGroupPropertyGridComponent.tsx index dc04b7e85d9..81e42072aa4 100644 --- a/packages/dev/inspector/src/components/actionTabs/tabs/propertyGrids/animations/animationGroupPropertyGridComponent.tsx +++ b/packages/dev/inspector/src/components/actionTabs/tabs/propertyGrids/animations/animationGroupPropertyGridComponent.tsx @@ -37,13 +37,15 @@ export class AnimationGroupGridComponent extends React.Component { this.updateCurrentFrame(this.props.animationGroup); }); - - this._timelineRef = React.createRef(); } disconnect(animationGroup: AnimationGroup) { @@ -73,9 +75,9 @@ export class AnimationGroupGridComponent extends React.Component 0) { - const runtimeAnimations = animationGroup.targetedAnimations[0].animation.runtimeAnimations; - if (runtimeAnimations.length > 0) { - this.setState({ currentFrame: runtimeAnimations[0].currentFrame }); + const runtimeAnimation = targetedAnimations[0].animation.runtimeAnimations.find((rA) => rA.target === targetedAnimations[0].target); + if (runtimeAnimation) { + this.setState({ currentFrame: runtimeAnimation.currentFrame }); } else { this.setState({ currentFrame: 0 }); } @@ -107,7 +109,6 @@ export class AnimationGroupGridComponent extends React.Component grp.pause()); animationGroup.play(true); } }