diff --git a/projects/ucap-webmessenger-app/src/app/layouts/messenger/components/left-sidenav/organization.component.ts b/projects/ucap-webmessenger-app/src/app/layouts/messenger/components/left-sidenav/organization.component.ts index f303b177..1f29064b 100644 --- a/projects/ucap-webmessenger-app/src/app/layouts/messenger/components/left-sidenav/organization.component.ts +++ b/projects/ucap-webmessenger-app/src/app/layouts/messenger/components/left-sidenav/organization.component.ts @@ -89,6 +89,9 @@ export class OrganizationComponent @ViewChild('cvsvDeptUser', { static: false }) cvsvDeptUser: CdkVirtualScrollViewport; + @ViewChild(PerfectScrollbarDirective, { static: false }) + psDirectiveRef?: PerfectScrollbarDirective; + companyList$: Observable; companyCode: string; @@ -153,6 +156,14 @@ export class OrganizationComponent ), map(list => { this.selectedDepartmentUserInfoList = list; + }), + tap(() => { + if (!!this.cvsvDeptUser) { + this.cvsvDeptUser.scrollToOffset(0); + } + if (!!this.psDirectiveRef) { + this.psDirectiveRef.update(); + } }) ) .subscribe(); diff --git a/projects/ucap-webmessenger-app/src/app/layouts/messenger/components/right-drawer/album-box.component.html b/projects/ucap-webmessenger-app/src/app/layouts/messenger/components/right-drawer/album-box.component.html index 1c60254d..e667e199 100644 --- a/projects/ucap-webmessenger-app/src/app/layouts/messenger/components/right-drawer/album-box.component.html +++ b/projects/ucap-webmessenger-app/src/app/layouts/messenger/components/right-drawer/album-box.component.html @@ -85,7 +85,6 @@
@@ -100,7 +99,10 @@ " >
- +
item.seq !== userInfo.seq ); + this.changeDetectorRef.detectChanges(); } getBtnValid() {