FIX: Ensure subcategory list is hidden when not required (#14424)

When the loading spinner is removed (e.g. via the loading-slider component), the subcategory list view will persist, even when no longer required. This is because we were conditionally rendering the list into the `header-list-container` outlet. When the condition was false, we were doing nothing. Instead, we should use `disconectOutlet` to make sure the content is removed from the DOM.
This commit is contained in:
David Taylor 2021-09-23 12:18:24 +01:00 committed by GitHub
parent ec087027b3
commit 688e03fc42
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 0 deletions

View File

@ -192,6 +192,8 @@ export default (filterArg, params) => {
outlet: "header-list-container",
model: this._categoryList,
});
} else {
this.disconnectOutlet({ outlet: "header-list-container" });
}
this.render("discovery/topics", {
controller: "discovery/topics",