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

Drop support for mm.LinkTo component, use LinkTo with on click modifier instead #821

Merged
merged 1 commit into from
Dec 1, 2023

Conversation

nickschot
Copy link
Owner

@nickschot nickschot commented Dec 1, 2023

Previously we supported:

<mmw.MobileMenu @isOpen={{this.isOpen}} @onToggle={{this.onToggle}} as |mm|>
  <mm.LinkTo @route="index">Home</mm.LinkTo>
</mmw.MobileMenu>

Which relied on https://github.com/emberjs/ember-legacy-built-in-components. This PR removes the custom (extended) LinkTo component entirely.

We now recommend to use the default LinkTo with an {{on "click"}} modifier and call the close action directly:

<mmw.MobileMenu @isOpen={{this.isOpen}} @onToggle={{this.onToggle}} as |mm|>
  <LinkTo @route="index" {{on "click" mm.actions.close}}>Home</LinkTo>
</mmw.MobileMenu>

@nickschot nickschot mentioned this pull request Dec 1, 2023
9 tasks
@nickschot nickschot merged commit e40b579 into master Dec 1, 2023
13 checks passed
@nickschot nickschot deleted the drop-link-to branch December 1, 2023 16:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant