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

call setData when children disappear #152

Conversation

jluxenberg
Copy link
Contributor

Previously, if you had a Layer that had Features as children,
and then the props changed such that the Layer no longer had
children, .setData would not be called to remove the
Features from the source.

To fix this, I've changed Layer so that it will always call
setData when rendered. This should be fine because Layer#render
will only be called if the component should update.

I've added tests as well.

Previously, if you had a Layer that had Features as children,
and then the props changed such that the Layer no longer had
children, <source>.setData would not be called to remove the
Features from the source.

To fix this, I've changed Layer so that it will always call
setData when rendered. This should be fine because Layer#render
will only be called if the component should update.

I've added tests as well.
@alex3165
Copy link
Owner

Thanks @jluxenberg nice job 👍

@alex3165 alex3165 merged commit 661da33 into alex3165:master Mar 14, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants