Skip to content

Commit

Permalink
fix(esl-togglable): open attribute change behavior
Browse files Browse the repository at this point in the history
  • Loading branch information
fshovchko committed Jul 14, 2023
1 parent ec6a398 commit 826b27b
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/modules/esl-toggleable/core/esl-toggleable.ts
Original file line number Diff line number Diff line change
Expand Up @@ -149,8 +149,10 @@ export class ESLToggleable extends ESLBaseElement {
if (!this.connected || newVal === oldVal) return;
switch (attrName) {
case 'open':
if (this.open === this.hasAttribute('open')) return;
this.toggle(this.open, {initiator: 'attribute', showDelay: 0, hideDelay: 0});
// eslint-disable-next-line no-case-declarations
const isOpen = this.hasAttribute('open');
if (this.open === isOpen) return;
this.toggle(isOpen, {initiator: 'attribute', showDelay: 0, hideDelay: 0});
break;
case 'group':
this.$$fire(this.GROUP_CHANGED_EVENT, {
Expand Down

0 comments on commit 826b27b

Please sign in to comment.