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

RouterLink is missing setRoute(Class<? extends Component> navigationTarget) #6540

Closed
Artur- opened this issue Sep 24, 2019 · 4 comments · Fixed by #6811
Closed

RouterLink is missing setRoute(Class<? extends Component> navigationTarget) #6540

Artur- opened this issue Sep 24, 2019 · 4 comments · Fixed by #6811

Comments

@Artur-
Copy link
Member

Artur- commented Sep 24, 2019

When you create a RouterLink, you can set the navigation target using a class. If you create an empty RouterLink, there is no longer any way to set the navigation target using a class. For some reason you also need a Router reference in this case but not in the first case

@caalador
Copy link
Contributor

Seems like we have that one constructor that uses the internal getRouter() method.
There should be no show stoppers to have a setRoute(Class<? extends Component> navigationTarget) override that would uses the same Router resolving.

@pleku
Copy link
Contributor

pleku commented Oct 8, 2019

Acceptance Criteria

  • Add the requested setter method as described above
  • Add a unit test
    (I don't see any reason to add a IT test for this)

Please read https://github.com/vaadin/flow/blob/master/CONTRIBUTING.md before contributing.

@pleku pleku moved this from Needs Design to Ready for Community in Vaadin Flow enhancements backlog (Vaadin 10+) Oct 8, 2019
@torok-peter torok-peter self-assigned this Oct 17, 2019
@torok-peter
Copy link
Contributor

Do we need a setRoute(navigationTarget, parameter) too?

@pleku
Copy link
Contributor

pleku commented Oct 28, 2019

Do we need a setRoute(navigationTarget, parameter) too?

@torok-peter I think it will be useful too and consistent with the constructors.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants