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

[BUGFIX] Recompute link-to active prop when attrs.params changes #16060

Closed
wants to merge 1 commit into from
Closed

[BUGFIX] Recompute link-to active prop when attrs.params changes #16060

wants to merge 1 commit into from

Conversation

jasonmit
Copy link
Member

@jasonmit jasonmit commented Jan 5, 2018

Prior to 2.18.0, the link-to component would recompute active/_active when attrs.params changed. This restores prior functionality where a deeply nested async relationship that resolves after initial render of a link-to and meets the criteria this._isActive then the active class is applied to the link element. Currently, that functionality is broken and the active class is never applied when the async relationship settles.

I'll update tests before this is merged once it's clear that this wasn't an intentional breaking change.

<= 2.17.0 behavior https://github.com/emberjs/ember.js/blob/v2.17.0/packages/ember-glimmer/lib/components/link-to.js#L593

Prior to 2.18.0, the link-to component would recompute active/_active whenever params changed.  This restores prior functionality.  I can also add tests when there is buy-in that this wasn't an intentional breaking change.
Copy link
Member

@rwjblue rwjblue left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Changes seem good to me, can you add a test case that fails prior to this (so we can ensure we don’t regress again)?

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.

4 participants