Components: Animations for md-select can not be disabled.

Created on 19 Jan 2017  Â·  11Comments  Â·  Source: angular/components

Bug, feature request, or proposal:

unable to disable md-select animations

What is the expected behavior?

I want to be able to disable all animation behavior for md-select

What is the current behavior?

Animations are a part of the template for md-select. There is not api to disable them.

What are the steps to reproduce?

Add md select to a html page, cjick on it, there is is an animation as the ms-select-panel is displayed. Oce an item is selected, ther is another animation as the menu is closed.
Providing a Plunker (or similar) is the best way to get the team to see your issue.
Plunker template: http://plnkr.co/edit/o077B6uEiiIgkC0S06dd

What is the use-case or motivation for changing an existing behavior?

Do not want animated behavior for my application.

Which versions of Angular, Material, OS, browsers are affected?

2.0.0-beta.1

Is there anything else we should know?

P5 materiaselect feature

Most helpful comment

@Tqader if you want to disable animations for the whole application, have you tried using NoopAnimationsModule instead of BrowserAnimationsModule?
Not sure it will solve the problem since according to #4227, not everything is disabled with it…

All 11 comments

@kara Is this going to be implemented?

+1

@Tqader if you want to disable animations for the whole application, have you tried using NoopAnimationsModule instead of BrowserAnimationsModule?
Not sure it will solve the problem since according to #4227, not everything is disabled with it…

In angular's new update in 4.3.1 animations can be disable.
I tried to disable animation on md-tab and it worked but for md-select I don't want option overlay to move upside.But due to transform-origin which is in inline style for md-select, can't disable it.

here is sample plnkr https://plnkr.co/edit/sVJM8H?p=preview

@kara
This problem is still actual for beta.10.
Why is it a problem?

  1. fade in/out animation of panel is very slow for fast(power) users.
  2. the animation work slow on IE11 (has lags)

I would like to suggest one more feature: API allows to select animation speed.

@victornoel your solution works. md-select is perfect without animation.

I'm having the same problem. I'm trying to write Protractor automated tests but these animations are causing a headache.

[[@.disabled]] doesn't have any effect at all on whether animations occur. This same issue applies to mat-menu. See stackblitz.

@HostBinding('@.disabled') public animationsDisabled = false; also does nothing (I know it's the same thing, but I had to give it a try).

NoopAnimationsModule disables the dropdown animation, but I can't use that due to AOT making it impossible to conditionally add modules to imports.

Adding the style * { transition: none !important } does not affect the animations. Apparently they're not CSS transitions.

Does anyone have any good workarounds to get these Protractor tests working? Maybe a way to conditionally load NoopAnimationsModule even with AOT in place? I'd even settle for a reliable way to have Protractor wait until all animations are complete.

Same problem here ! Any news ?

still nothing?

The animation for MatSelect can be disabled with NoopAnimationsModule

This issue has been automatically locked due to inactivity.
Please file a new issue if you are encountering a similar or related problem.

Read more about our automatic conversation locking policy.

_This action has been performed automatically by a bot._

Was this page helpful?
0 / 5 - 0 ratings

Related issues

alanpurple picture alanpurple  Â·  3Comments

kara picture kara  Â·  3Comments

3mp3ri0r picture 3mp3ri0r  Â·  3Comments

RoxKilly picture RoxKilly  Â·  3Comments

jelbourn picture jelbourn  Â·  3Comments