New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Can we have option to disable animation in some components? #16943
Comments
Hi, what's the background on don't want the animation? |
@zombieJ my Tree component have hundreds of item and I don't want to have animation to cost performance of the tree on expand / collapse (this is main reason). Also when the tree expands, it overflows the container's height, which is fine, but the scrollbar keeps changing during the animation. You can see the gif below ^ This is minor, not very important. |
Since animation works close with component, make it configurable may not easy at the moment. We may need social Volunteer to help on this. |
Is it acceptable to add ‘disable animation’ option to ConfigProvider? |
@muzea, I'm OK with it. |
Is there any good way to measure how much performance will improve after removing the animation? Is there any indicator for the user to measure whether it is worthwhile to remove the animation? |
For above example. The best way is to support virtual list which has been planed in v4. |
…tocomplete/select/tree-select
Has there been any work done in this area? Or is there another issue that better tracks the discussion? I would be interested in a way to easily disable all animations/transitions on all components. The reason is that we run a lot of UI tests (using Cypress) against our app and the Ant component animations cause random errors and test failures. We would like to disable animations, but only for our tests. |
It seems like setting |
You can use The original solution for |
What problem does this feature solve?
It would be great if we have option to disable animation or at least customize them in some components such as Tree or Modal.
What does the proposed API look like?
For example Tree component with prop
animation={false}
will render the tree without CSSMotion component wrapped around itThe text was updated successfully, but these errors were encountered: