-
Notifications
You must be signed in to change notification settings - Fork 6.8k
bug(MatMenu): Cannot disable animations #21765
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
Comments
I suspect that this might be an issue with the |
I spent a bit of time looking into it, but couldn't find anything specific. One workaround is to define our own |
I extended the repro stackblitz project with a custom component that have a simple animation which I can disable in parent component using [@.disabled]=true so it seems related more to material components |
Did this used to work with |
I'm absolutely sure that this ticket soon will closed due to inactivity. Therefore I'm gonna close this right now to not disturb our lovely bot that closes issues no one cares about :) |
The bot only locks issues that have been closed and haven't had any activity in more than 30 days. For what it's worth, I think that this is a valid issue, but I can't guarantee when it'll be resolved since our team has its own set of commitments. |
To disable the animation in the mat menu, add the following CSS.
Please note: this will affect all components. |
Add class on your <mat-menu class="searchMenu" #searchMenu> And add class on your css file .searchMenu.ng-animating,
.searchMenu.ng-trigger-transformMenu{
animation: none !important;
transition: none !important;
transform-origin: center center !important;
animation-duration: 0s !important;
transform: none !important;
opacity: 1 !important;
pointer-events: all !important;
} Thanks to @jaykhatri2020 to comment stylesheet |
Covered by #20781. |
This issue has been automatically locked due to inactivity. Read more about our automatic conversation locking policy. This action has been performed automatically by a bot. |
Reproduction
Stackblitz repro
Expected Behavior
Menu animations to be disabled
Actual Behavior
Animations are remain
Environment
The text was updated successfully, but these errors were encountered: