From e3e54ec194adc719061c592088dee75e8cfe5005 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pau=20Ferrer=20Oca=C3=B1a?= Date: Thu, 31 Mar 2022 17:23:32 +0200 Subject: [PATCH] MOBILE-3833 collapsible: Fix collapsible header enabled --- src/core/directives/collapsible-header.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/core/directives/collapsible-header.ts b/src/core/directives/collapsible-header.ts index 196a2b1ce..31a4083bc 100644 --- a/src/core/directives/collapsible-header.ts +++ b/src/core/directives/collapsible-header.ts @@ -89,6 +89,7 @@ export class CoreCollapsibleHeaderDirective implements OnInit, OnChanges, OnDest * @inheritdoc */ ngOnInit(): void { + this.collapsible = !CoreUtils.isFalseOrZero(this.collapsible); this.init(); } @@ -117,7 +118,8 @@ export class CoreCollapsibleHeaderDirective implements OnInit, OnChanges, OnDest */ async ngOnChanges(changes: {[name: string]: SimpleChange}): Promise { if (changes.collapsible) { - this.enabled = !CoreUtils.isFalseOrZero(changes.collapsible.currentValue); + this.collapsible = !CoreUtils.isFalseOrZero(changes.collapsible.currentValue); + this.enabled = this.collapsible; await this.init();