mirror of
https://github.com/ionic-team/ionic-framework.git
synced 2025-08-20 12:29:55 +08:00
fix(accordion): accordions expand when using binding (#25322)
resolves #25307
This commit is contained in:
@ -211,7 +211,8 @@ export class Accordion implements ComponentInterface {
|
||||
};
|
||||
|
||||
private expandAccordion = (initialUpdate = false) => {
|
||||
if (initialUpdate) {
|
||||
const { contentEl, contentElWrapper } = this;
|
||||
if (initialUpdate || contentEl === undefined || contentElWrapper === undefined) {
|
||||
this.state = AccordionState.Expanded;
|
||||
return;
|
||||
}
|
||||
@ -220,11 +221,6 @@ export class Accordion implements ComponentInterface {
|
||||
return;
|
||||
}
|
||||
|
||||
const { contentEl, contentElWrapper } = this;
|
||||
if (contentEl === undefined || contentElWrapper === undefined) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (this.currentRaf !== undefined) {
|
||||
cancelAnimationFrame(this.currentRaf);
|
||||
}
|
||||
@ -250,7 +246,8 @@ export class Accordion implements ComponentInterface {
|
||||
};
|
||||
|
||||
private collapseAccordion = (initialUpdate = false) => {
|
||||
if (initialUpdate) {
|
||||
const { contentEl } = this;
|
||||
if (initialUpdate || contentEl === undefined) {
|
||||
this.state = AccordionState.Collapsed;
|
||||
return;
|
||||
}
|
||||
@ -259,11 +256,6 @@ export class Accordion implements ComponentInterface {
|
||||
return;
|
||||
}
|
||||
|
||||
const { contentEl } = this;
|
||||
if (contentEl === undefined) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (this.currentRaf !== undefined) {
|
||||
cancelAnimationFrame(this.currentRaf);
|
||||
}
|
||||
|
Reference in New Issue
Block a user