expandAll & collapseAll is modified

This commit is contained in:
병준 박 2019-11-18 16:28:47 +09:00
parent 4627e918ec
commit 686c859e74

View File

@ -15,7 +15,7 @@ import {
import { ucapAnimations } from '@ucap-webmessenger/ui';
import { GroupDetailData, UserInfo } from '@ucap-webmessenger/protocol-sync';
import { MatAccordion, MatTreeFlattener } from '@angular/material';
import { MatAccordion, MatTreeFlattener, MatTree } from '@angular/material';
import { ExpansionPanelItemDirective } from '../directives/expansion-panel-item.directive';
import {
UserInfoSS,
@ -155,7 +155,8 @@ export class ExpansionPanelComponent
})
expansionPanelItemTemplateRef: TemplateRef<ExpansionPanelItemDirective>;
@ViewChild('groupAccordion', { static: true }) groupAccordion: MatAccordion;
@ViewChild('groupTree', { static: false })
groupTree: MatTree<FlatNode>;
@ViewChild('cvsvGroup', { static: false })
cvsvGroup: CdkVirtualScrollViewport;
@ -226,11 +227,11 @@ export class ExpansionPanelComponent
isHeader = (_: number, node: FlatNode) => 0 === node.level;
expandMore() {
this.groupAccordion.openAll();
this.groupTree.treeControl.expandAll();
}
expandLess() {
this.groupAccordion.closeAll();
this.groupTree.treeControl.collapseAll();
}
onClickMore(event: MouseEvent, group: GroupDetailData) {