Skip to content

Commit

Permalink
use a static event name (#4677)
Browse files Browse the repository at this point in the history
  • Loading branch information
dlockhart committed May 14, 2024
1 parent 643b7c4 commit 0731226
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion components/collapsible-panel/collapsible-panel.js
Expand Up @@ -390,7 +390,7 @@ class CollapsiblePanel extends SkeletonMixin(FocusMixin(RtlMixin(LitElement))) {

_handleExpandCollapse(e) {
const eventPromise = this.expanded ? e.detail.expandComplete : e.detail.collapseComplete;
const event = `d2l-collapsible-panel-${this.expanded ? 'expand' : 'collapse' }`;
const event = this.expanded ? 'd2l-collapsible-panel-expand' : 'd2l-collapsible-panel-collapse';

this.dispatchEvent(new CustomEvent(
event, { bubbles: false, composed: false, detail: { complete: eventPromise } }
Expand Down

0 comments on commit 0731226

Please sign in to comment.