-
Notifications
You must be signed in to change notification settings - Fork 773
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
Responsive FxFlex breaks with *ngFor and FxLayoutAlign #1046
Comments
Thanks for bringing this up. Please update your post to include ALL Angular "Structural Directives" since I have the exact same with *NgIf and I'm almost certain this behavior appears for all Structural Directives. I have come up with a workaround to fix this issue for now:
Hopefully this fixes your issue for now. I'm not sure if this behavior is intended by the Flex API or Angular team or if it should be considered a BUG but I'll be subscribing to this for an answer. |
@Alex-Samari I don't think this is as widespread as you're making this out to be. @alexcoroza The root cause of this is that |
@CaerusKaru |
@alexcoroza @Alex-Samari I think this is solved in the latest builds. Can one of you test with the nightly build to verify? |
@CaerusKaru Just installed nightly build |
Excellent! If this is still an issue for anyone else, we can reopen this later. |
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
I'm having a problem using responsive fxFlex. So I have a
<div fxLayout="row wrap">
and inside it is I have a<div *ngFor="let entry of entries" fxFlex="25" fxFlex.xs="50">
but thefxFlex.xs="25"
works only on the initial page load and not working if you resize the window or when you landscape/portrait your phone. But when you removed the*ngFor="let entry of entries"
and manually put the divs, it worked just fine. Here is a sample code that shows the problem. There are other scenarios where you remove the fxLayoutAlign and retain the *ngFor and will work just fine.stackblitz sample code
What is the expected behavior?
I expect fxFlex.xs="25" to work(even with *ngFor and fxLayoutAlign) when the screen is xs
What is the current behavior?
fxFlex.xs="25" doesn't work if you resize the window to xs back and forth, it instead shows fxFlex="100" when xs
What are the steps to reproduce?
stackblitz sample code
What is the use-case or motivation for changing an existing behavior?
This is a problem if the customer is using a mobile phone, he can always switch from portrait(xs) to landscape(sm) and vice versa.
Which versions of Angular, Material, OS, TypeScript, browsers are affected?
I don't know but I tried the latest version as of now April 3, 2019. Well it is indicated in package.json in the Stackblitz link I provided
Is there anything else we should know?
The text was updated successfully, but these errors were encountered: