emberjs / emberjs/ember.js

link-to has active state applied when a route transition is retried

Open
#14,929 0 comments 1 reaction 0 assignees View on GitHub
Has Reproduction Routing
Dominant language
TypeScript
Stars
22.6k
Forks
4.2k
Avg merge
3d 12h
Merged PRs (30d)
15

Description

When conditionally pausing a route transition, all link-to components will receive an .active state when the transition is .retry()ed

**Ember Twiddle**: https://ember-twiddle.com/565939b8d37b315aae854172cf007cd0

In this particular use case, we want to be able to pause the transition and prompt the user if they actually want to transition to a new route. If they were in the middle of editing something, we want to be able to pause the transition, ask the user if they want to transition knowing that their edit state may be lost, If the user cancels, the route transition should remain cancelled, however if the user wants to discard their changes and confirms to move onto the next route, the previous transition is retried. This is when the link-to gets the incorrect state, and all link-to components are toggled into an .active state.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.