Skip to content

Conversation

@justindirose
Copy link
Contributor

When using a single Ember route, the query param filters did not
properly reset when, for example, clicking the Knowledge Explorer link
in the hamburger menu.

This commit introduces a subroute where most of the logic takes place.
This allows us to use the refreshModel option for query params on the
route and remove the refresh controller action. Doing so also retains
state of the search field instead of fully reloading the parent route.

Admittedly, mucking around with subroutes like this was a little foreign to me. I did inject the child controller into the parent so the search box would work. I'm not sure how stable/fragile this is, but it seemed like the best path forward.

When using a single Ember route, the query param filters did not
properly reset when, for example, clicking the Knowledge Explorer link
in the hamburger menu.

This commit introduces a subroute where most of the logic takes place.
This allows us to use the `refreshModel` option for query params on the
route and remove the refresh controller action. Doing so also retains
state of the search field instead of fully reloading the parent route.
Copy link
Member

@featheredtoast featheredtoast left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I went over some points I didn't understand, and it looks good to me.
We needed a subroute so that refresh doesn't take out the entire UI part.
I'd ideally like to avoid controller injection, but I do not see a clear way of doing that.

@justindirose justindirose merged commit dd55d16 into master Nov 4, 2020
@justindirose justindirose deleted the clear-fix branch November 4, 2020 18:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

3 participants