FIX: pass custom section willDestroy (#17551)
Custom sections `willDestroy` function has to be passed to SidebarSection component to call when component is removed.
This commit is contained in:
parent
fe6ec28228
commit
7230b0d436
|
@ -16,6 +16,12 @@ export default class SidebarSection extends GlimmerComponent {
|
|||
: false;
|
||||
}
|
||||
|
||||
willDestroy() {
|
||||
if (this.args.willDestroy) {
|
||||
this.args.willDestroy();
|
||||
}
|
||||
}
|
||||
|
||||
@action
|
||||
toggleSectionDisplay() {
|
||||
this.displaySection = !this.displaySection;
|
||||
|
|
|
@ -18,7 +18,8 @@
|
|||
@headerLinkText={{customSection.text}}
|
||||
@headerLinkTitle={{customSection.title}}
|
||||
@headerActionsIcon={{customSection.actionsIcon}}
|
||||
@headerActions={{customSection.actions}}>
|
||||
@headerActions={{customSection.actions}}
|
||||
@willDestroy={{customSection.willDestroy}}>
|
||||
|
||||
{{#each customSection.links as |link|}}
|
||||
<Sidebar::SectionLink
|
||||
|
|
Loading…
Reference in New Issue