DEV: Use toggle event for sidebar more-section-links component (#17729)

A click event is trigger on a link click as well which is not what we
want. This caused the links to trigger a full reload instead of an Ember
transition for some reason.
This commit is contained in:
Alan Guo Xiang Tan 2022-07-29 13:09:32 +08:00 committed by GitHub
parent a6e815f243
commit c9a3aba5a2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 1 additions and 3 deletions

View File

@ -41,8 +41,6 @@ export default class SidebarMoreSectionLinks extends GlimmerComponent {
document
.querySelector(".sidebar-more-section-links-details")
?.removeAttribute("open");
this.toggleSectionLinks();
}
}
}

View File

@ -10,7 +10,7 @@
@model={{this.activeSectionLink.model}} />
{{/if}}
<details class="sidebar-more-section-links-details" {{on "click" this.toggleSectionLinks}}>
<details class="sidebar-more-section-links-details" {{on "toggle" this.toggleSectionLinks}}>
<summary class="sidebar-more-section-links-details-summary" >
{{i18n "sidebar.more_count" (hash count=this.sectionLinks.length)}}
</summary>