mirror of
https://github.com/Alfresco/alfresco-ng2-components.git
synced 2025-07-24 17:32:15 +00:00
[ADF-3354] accordion-group closed behaviour (#3595)
* accordion-group closed fix * tests fixes * tests added * tests fixes * Fix failing unit test and revert deleted method
This commit is contained in:
@@ -78,19 +78,19 @@ export class AccordionGroupComponent implements AfterViewInit {
|
||||
constructor() { }
|
||||
|
||||
ngAfterViewInit() {
|
||||
this.hasContent = this.contentWrapper.nativeElement && this.contentWrapper.nativeElement.children.length > 0;
|
||||
this.hasContent = this.contentWrapper ? this.contentWrapper.nativeElement && this.contentWrapper.nativeElement.children.length > 0 : false;
|
||||
}
|
||||
|
||||
hasHeadingIcon() {
|
||||
return this.headingIcon ? true : false;
|
||||
return !!this.headingIcon;
|
||||
}
|
||||
|
||||
onHeaderClick(): void {
|
||||
this.headingClick.emit(this.heading);
|
||||
}
|
||||
|
||||
isExpandable(event: any) {
|
||||
if (!this.hasContent || !this.isOpen) {
|
||||
isExpandable() {
|
||||
if (this.hasContent && this.isSelected) {
|
||||
this.expandPanel();
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user