expandAll & collapseAll is modified
This commit is contained in:
parent
4627e918ec
commit
686c859e74
|
@ -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) {
|
||||
|
|
Loading…
Reference in New Issue
Block a user