-
Notifications
You must be signed in to change notification settings - Fork 768
FxLayout element with fxHide.xs doesn't hide on media changes #945
Comments
While I can plainly confirm that this is an issue, I'm having a hell of a time confirming it using our internal test suite. This may take some time to track down using other methods. The workaround for now is to use |
So in the bound boolean variable case, is that something like I guess I could also try |
Yeah, that's the general idea. The root cause analysis on this is that there's a race condition between We'll have a patch for this, but it won't be published until the next release (although it will be available in the nightly builds). |
Same issue here, even when I replace fxHide directives with ngStyle.xs="display: 'none'". |
The issue is a conflict with Alternatively you can put these in classes and use responsive I've patched this in #948, so it'll definitely be fixed in the next release, and I apologize for the confusion in the meantime. |
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. |
Bug Report
What is the expected behavior?
<div fxLayout fxHide.xs></div>
respects media changes and hides the element at extra-small screen sizes.<div fxLayout [fxHide.xs]="booleanVariable"></div>
respects media changes and hides the element at extra-small screen sizes if thebooleanVariable
is true. This case is specific to my own code, and I want to make sure it works.What is the current behavior?
<div fxLayout [fxHide.xs]="booleanVariable"></div>
Note: When the element doesn't have
fxLayout
(e.g.<div [fxHide.xs]="booleanVariable"></div>
), it works properly.What are the steps to reproduce?
Providing a StackBlitz (or similar) is the best way to get the team to see your issue.
https://stackblitz.com/edit/angular-flex-layout-seed-k1oskk?file=app%2Ftest.component.ts
What is the use-case or motivation for changing an existing behavior?
It's broken.
Which versions of Angular, Material, OS, TypeScript, browsers are affected?
Angular 7.1.4
Material 7.2.0
TypeScript 3.1.6
Is there anything else we should know?
The text was updated successfully, but these errors were encountered: