Skip to content

Commit 082291f

Browse files
edcarrollmcosta74
authored andcommitted
fix(popup): Fixed duplication glitch on rapid open & close
1 parent 12ec7f4 commit 082291f

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

src/modules/popup/classes/popup-component-controller.ts

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,8 +30,10 @@ export class SuiPopupComponentController<T> extends SuiPopupController {
3030
}
3131

3232
public open():void {
33-
this._contentComponentRef = this._componentFactory.createComponent(this._component as Type<T>);
34-
this._componentFactory.attachToView(this._contentComponentRef, this.popup.templateSibling);
33+
if (!this._contentComponentRef) {
34+
this._contentComponentRef = this._componentFactory.createComponent(this._component as Type<T>);
35+
this._componentFactory.attachToView(this._contentComponentRef, this.popup.templateSibling);
36+
}
3537

3638
super.open();
3739
}

0 commit comments

Comments
 (0)