MOBILE-3833 collapsible: Fix collapsible header enabled

main
Pau Ferrer Ocaña 2022-03-31 17:23:32 +02:00
parent 2ce808dfab
commit e3e54ec194
1 changed files with 3 additions and 1 deletions

View File

@ -89,6 +89,7 @@ export class CoreCollapsibleHeaderDirective implements OnInit, OnChanges, OnDest
* @inheritdoc * @inheritdoc
*/ */
ngOnInit(): void { ngOnInit(): void {
this.collapsible = !CoreUtils.isFalseOrZero(this.collapsible);
this.init(); this.init();
} }
@ -117,7 +118,8 @@ export class CoreCollapsibleHeaderDirective implements OnInit, OnChanges, OnDest
*/ */
async ngOnChanges(changes: {[name: string]: SimpleChange}): Promise<void> { async ngOnChanges(changes: {[name: string]: SimpleChange}): Promise<void> {
if (changes.collapsible) { if (changes.collapsible) {
this.enabled = !CoreUtils.isFalseOrZero(changes.collapsible.currentValue); this.collapsible = !CoreUtils.isFalseOrZero(changes.collapsible.currentValue);
this.enabled = this.collapsible;
await this.init(); await this.init();