Skip to content
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

fxLayoutGap not applied to children inserted after initial render #95

Closed
drew-moore opened this issue Jan 6, 2017 · 4 comments · Fixed by #124
Closed

fxLayoutGap not applied to children inserted after initial render #95

drew-moore opened this issue Jan 6, 2017 · 4 comments · Fixed by #124
Labels
bug has pr A PR has been created to address this issue pr: needs presubmit
Milestone

Comments

@drew-moore
Copy link

drew-moore commented Jan 6, 2017

Plunk.

When a container with a layout gap has a child that isn't present initially (e.g. has an ngIf condition that evaluates to false), the gap is not applied to the child when it is subsequently inserted.

Worth noting: layoutAlign is working as expected (presumably because alignment is implemented via a rule on the parent whereas gaps are implemented as margins on the children, which isn't happening for children added after the initial layout computation).

@ThomasBurleson
Copy link
Contributor

Definitely an oversight. We will fix. Thx

@ThomasBurleson ThomasBurleson added this to the v2.0.0-rc.0 milestone Jan 6, 2017
@ThomasBurleson
Copy link
Contributor

@drew-moore - this issue is non-trivial to solve since the @ContentChildren does not support the * selector to match all content-children. Currently the developer must know the Type or the template variable ref name... neither of which is practical for our needs.

The only other current option is to watch with a MutationObserver.

This is a known issue in Angular: angular/angular#9989

@pkozlowski-opensource - any thoughts

ThomasBurleson added a commit that referenced this issue Jan 22, 2017
* fxLayoutGap not applied to children inserted after initial render

Fixes #95.
ThomasBurleson added a commit that referenced this issue Jan 22, 2017
* fxLayoutGap not applied to children inserted after initial render

Fixes #95.
ThomasBurleson added a commit that referenced this issue Jan 22, 2017
* fxLayoutGap not applied to children inserted after initial render

Fixes #95.
@ThomasBurleson
Copy link
Contributor

@drew-moore - see pending Pull Request #124

@ThomasBurleson ThomasBurleson added has pr A PR has been created to address this issue pr: needs presubmit labels Jan 22, 2017
@ThomasBurleson ThomasBurleson modified the milestones: v2.0.0-beta.4, v2.0.0-rc.0 Jan 22, 2017
ThomasBurleson added a commit that referenced this issue Jan 23, 2017
* fxLayoutGap not applied to children inserted after initial render

Fixes #95.
ThomasBurleson added a commit that referenced this issue Jan 23, 2017
* fxLayoutGap not applied to children inserted after initial render

Fixes #95.
andrewseguin pushed a commit that referenced this issue Jan 24, 2017
* fxLayoutGap not applied to children inserted after initial render

Fixes #95.
@angular-automatic-lock-bot
Copy link

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.

@angular-automatic-lock-bot angular-automatic-lock-bot bot locked and limited conversation to collaborators Sep 4, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug has pr A PR has been created to address this issue pr: needs presubmit
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants