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

<LinkTo> doesn't require @route if @query is provided #102

Closed
wagenet opened this issue Mar 30, 2021 · 1 comment
Closed

<LinkTo> doesn't require @route if @query is provided #102

wagenet opened this issue Mar 30, 2021 · 1 comment

Comments

@wagenet
Copy link
Contributor

wagenet commented Mar 30, 2021

Maybe this is a bad practice, but it does actually work despite glint being unhappy.

app/components/sortable-header.hbs:3:5 - error TS2345: Argument of type '{ query: { sortKey: string; }; }' is not assignable to parameter of type 'LinkToArgs'.
  Property 'route' is missing in type '{ query: { sortKey: string; }; }' but required in type 'LinkToArgs'.

  3     <LinkTo @query={{hash sortKey=this.sortKey}}>
        ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  4       <span class="sortable-header-name">
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
... 
 13       </span>
    ~~~~~~~~~~~~~
 14     </LinkTo>
@wagenet
Copy link
Contributor Author

wagenet commented Mar 30, 2021

I can't find docs that validate this, but this issue seems to support this behavior emberjs/ember.js#17963.

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

No branches or pull requests

1 participant