emberjs / emberjs/ember.js

[Bug] <RouterService>#transitionTo incorrectly re-runs the the model hook when query params do not change

Open
#19,497 13 comments 9 reactions 0 assignees View on GitHub
bug Routing
Dominant language
TypeScript
Stars
22.6k
Forks
4.2k
Avg merge
3d 12h
Merged PRs (30d)
15

Description

### 🐞 Describe the Bug

- have queryParams
- configure the query params to `refeshModel: true`
- navigate to a child route with the router service's transitionTo
- notice that the parent route's model hook re-runs

### 🔬 Minimal Reproduction

[Twiddle](https://ember-twiddle.com/1eaf11293017b1dd6ee76395da699a12?openFiles=routes.application%5C.js%2C)

### 😕 Actual Behavior

the parent model hook is re-running (in the application route in the repro)

### 🤔 Expected Behavior

the parent model hook should not run (as with the transitionToRoute behavior)

### 🌍 Environment

- Ember: - Octane+
- Node.js/npm: - n/a
- OS: - n/a
- Browser: - n/a

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.