What problem does this feature solve?
I want do something AFTER the Sider component's collapse animation is finished . But the listener onCollapse
triggered when the animation begin . Is there a listener like onCollapsed
but not onCollapse
?
What does the proposed API look like?
Just the same behavior like onCollapse
but triggered After the animation finished .
4条答案
按热度按时间gg0vcinb1#
Why do you need this? Could you provide more infomation about your requirement.
2vuwiymt2#
There is a example U provided .
In this example the sider is full-height . that's exactly what i want . However , I prefer the Sider Component to be a FIXED component and DO NOT roll-up-down with the page .
So, I do something like this :
If I don't do anythings else . The Content will be covered by the Sider because the Sider is fixed .
So , I have to give marginLeft to Content Component , I do something like this :
It Almost worked ! But the Animation make something wrong . The handler is called at the beginning of Animation . So when the fold-animation is running , the Content Component will cover the Sider Component for a few moment ...
So I have to do some magic code like this ...
No cover anymore BUT white space .... :(
If there is a
onCollapsed
listener , I will not need setTimer anymore . But the white space still exists.Is there any other ways graceful ?
tgabmvqs3#
@chenshuai2144 is it the exact same thing you want.
v1l68za44#
yes.
But I hope to solve it by other methods.
declarative style is the best