Ser*_*eyn 9 javascript browser animation reactjs material-ui
<Collapse
in={expanded}
onTransitionEnd={() => console.log('finished')}
>
<div>foo</div>
</Collapse>
Run Code Online (Sandbox Code Playgroud)
折叠动画完成时不会调用回调(onTransitionEnd)。
我应该怎么做?
我还期望addEndListener
(Collapse API )在动画之后触发,但事实并非如此。与 Sereyn 的答案类似,这对我有用:
<Collapse
onEntered={() => console.log("expand animation done")}
onExited={() => console.log("collapse animation done")}
in={checked}
>
{icon}
</Collapse>
Run Code Online (Sandbox Code Playgroud)
归档时间: |
|
查看次数: |
3540 次 |
最近记录: |