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

[NG] Stop caching children for lazy recursive trees #3211

Merged
merged 1 commit into from Mar 18, 2019

Conversation

Projects
None yet
4 participants
@youdz
Copy link
Contributor

youdz commented Mar 12, 2019

We used to fetch children for lazy recursive trees only once, but we closed their selection Observable when we shouldn't. Rather than avoid closing the Observables when we reuse models, I decided to stop caching children altogether, letting the app decide whether they want to cache or not and do it on their side. It's less intrusive and more flexible.

Fixes #3209.

[NG] Stop caching children for lazy recursive trees
We used to fetch children for lazy recursive trees only once, but we closed their selection Observable when we shouldn't. Rather than avoid closing the Observables when we reuse models, I decided to stop caching children altogether, letting the app decide whether they want to cache or not and do it on their side. It's less intrusive and more flexible.

Fixes #3209.

Signed-off-by: Eudes Petonnet-Vincent <epetonnetvince@vmware.com>

@youdz youdz added Bug Dev labels Mar 12, 2019

@youdz youdz self-assigned this Mar 12, 2019

@Shijir

Shijir approved these changes Mar 12, 2019

delete this.hostComponent.parent;
this.hostComponent.children = TEST_ROOT.children;
this.detectChanges();
expect(this.clarityElement.textContent).toMatch(/A\s*B\s*C/);
});

it('does not destroy the children when he parent becomes collapsed if the tree is eager', function(this: Context) {

This comment has been minimized.

Copy link
@Shijir

Shijir Mar 12, 2019

Contributor

he parent

omg 😱 👆 this is terrible :trollface:

@gnomeontherun
Copy link
Contributor

gnomeontherun left a comment

Outside of some of the naming of things like destroying children, looks good.

@youdz

This comment has been minimized.

Copy link
Contributor Author

youdz commented Mar 12, 2019

I’m happy to update names if you have something in mind. This was pretty rushed to be fair.

@youdz youdz merged commit 54d6a15 into vmware:master Mar 18, 2019

2 checks passed

continuous-integration/travis-ci/pr The Travis CI build passed
Details
deploy/netlify Deploy preview ready!
Details

@coryrylan coryrylan added this to the 1.1.2 milestone Mar 21, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.