Merge branch 'master' of https://git.loafle.net/ucap-web/next-ucap-messenger
This commit is contained in:
commit
82537b2d0d
|
@ -13,6 +13,7 @@
|
|||
</mat-card-header>
|
||||
<mat-card-content>
|
||||
<ucap-integrated-search
|
||||
#integratedSearch
|
||||
[sessionVerinfo]="sessionVerinfo"
|
||||
[presence]="presence$ | async"
|
||||
[searchWord]="!!data.keyword ? data.keyword : ''"
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
import { Component, OnInit, Inject, OnDestroy } from '@angular/core';
|
||||
import { Component, OnInit, Inject, OnDestroy, ViewChild } from '@angular/core';
|
||||
import { MatDialogRef, MAT_DIALOG_DATA, PageEvent } from '@angular/material';
|
||||
import { KEY_VER_INFO } from '@app/types';
|
||||
import { SessionStorageService } from '@ucap-webmessenger/web-storage';
|
||||
|
@ -31,6 +31,7 @@ import {
|
|||
ProfileDialogData,
|
||||
ProfileDialogResult
|
||||
} from '../profile/profile.dialog.component';
|
||||
import { IntegratedSearchComponent } from 'projects/ucap-webmessenger-ui/src/lib/components/integrated-search.component';
|
||||
|
||||
export interface IntegratedSearchDialogData {
|
||||
keyword: string;
|
||||
|
@ -59,6 +60,9 @@ export class IntegratedSearchDialogComponent implements OnInit, OnDestroy {
|
|||
pageCurrent = 1;
|
||||
pageListCount = 20;
|
||||
|
||||
@ViewChild('integratedSearch', { static: false })
|
||||
integratedSearchComponent: IntegratedSearchComponent;
|
||||
|
||||
constructor(
|
||||
public dialogRef: MatDialogRef<
|
||||
IntegratedSearchDialogData,
|
||||
|
@ -109,12 +113,14 @@ export class IntegratedSearchDialogComponent implements OnInit, OnDestroy {
|
|||
|
||||
onReSearch(searchWord: string) {
|
||||
this.pageCurrent = 1;
|
||||
|
||||
this.integratedSearchComponent.paginator.pageIndex = 0;
|
||||
this.onSearch(searchWord);
|
||||
}
|
||||
|
||||
onSearch(searchWord: string) {
|
||||
this.currentSearchWord = this.data.keyword;
|
||||
if (this.currentSearchWord !== searchWord) {
|
||||
this.currentSearchWord = searchWord;
|
||||
}
|
||||
|
||||
if (searchWord.trim().length > 0) {
|
||||
this.searchingProcessing = true;
|
||||
|
|
Loading…
Reference in New Issue
Block a user