diff --git a/projects/ucap-webmessenger-app/src/app/layouts/messenger/components/left-sidenav/organization.component.html b/projects/ucap-webmessenger-app/src/app/layouts/messenger/components/left-sidenav/organization.component.html index ae9341a2..0c77d7da 100644 --- a/projects/ucap-webmessenger-app/src/app/layouts/messenger/components/left-sidenav/organization.component.html +++ b/projects/ucap-webmessenger-app/src/app/layouts/messenger/components/left-sidenav/organization.component.html @@ -62,14 +62,14 @@
- - +
(); - @ViewChild('cvsvDeptUser', { static: false }) - cvsvDeptUser: CdkVirtualScrollViewport; + @ViewChild('vsDeptUser', { static: false }) + private vsDeptUser: VirtualScrollerComponent; @ViewChild('vsDeptSearchUser', { static: false }) private vsDeptSearchUser: VirtualScrollerComponent; @@ -206,8 +206,8 @@ export class OrganizationComponent this.selectedDepartmentUserInfoList = list; }), tap(() => { - if (!!this.cvsvDeptUser) { - this.cvsvDeptUser.scrollToOffset(0); + if (!!this.vsDeptUser) { + this.vsDeptUser.scrollToIndex(0); } if (!!this.psDirectiveRef) { this.psDirectiveRef.update(); @@ -252,14 +252,13 @@ export class OrganizationComponent ngAfterViewChecked(): void { if ( - !!this.cvsvDeptUser && + !!this.vsDeptUser && !!this.selectedDepartmentUserInfoList && this.selectedDepartmentUserInfoList.length > 0 && !this.isInitList && this.isVisible ) { this.isInitList = true; - this.cvsvDeptUser.checkViewportSize(); } }