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