# 시험결과분석 46
This commit is contained in:
parent
515b0135f8
commit
3298542f04
|
@ -156,6 +156,7 @@
|
|||
</div>
|
||||
<div *ngIf="isShowSearchArea" class="chat-search">
|
||||
<ucap-chat-search
|
||||
#chatSearch
|
||||
[totalCount]="searchTotalCount"
|
||||
[curIndex]="searchCurrentIndex"
|
||||
(searchText)="onSearchChat($event)"
|
||||
|
@ -181,7 +182,9 @@
|
|||
(fileDragLeave)="onFileDragLeave()"
|
||||
>
|
||||
<!-- CHAT MESSAGES -->
|
||||
<button mat-stroked-button class=" icon-button text-accent-darkest"><i class="mid mdi-arrow-collapse-down"></i></button>
|
||||
<button mat-stroked-button class=" icon-button text-accent-darkest">
|
||||
<i class="mid mdi-arrow-collapse-down"></i>
|
||||
</button>
|
||||
|
||||
<ucap-chat-messages
|
||||
#chatMessages
|
||||
|
|
|
@ -72,7 +72,8 @@ import {
|
|||
import { take, map, catchError } from 'rxjs/operators';
|
||||
import {
|
||||
FormComponent as UCapUiChatFormComponent,
|
||||
MessagesComponent as UCapUiChatMessagesComponent
|
||||
MessagesComponent as UCapUiChatMessagesComponent,
|
||||
SearchComponent
|
||||
} from '@ucap-webmessenger/ui-chat';
|
||||
import { KEY_VER_INFO } from '@app/types';
|
||||
import { VersionInfo2Response } from '@ucap-webmessenger/api-public';
|
||||
|
@ -145,6 +146,9 @@ export class MessagesComponent implements OnInit, OnDestroy, AfterViewInit {
|
|||
@Output()
|
||||
closeRightDrawer = new EventEmitter();
|
||||
|
||||
@ViewChild('chatSearch', { static: false })
|
||||
private chatSearch: SearchComponent;
|
||||
|
||||
@ViewChild('chatForm', { static: false })
|
||||
private chatForm: UCapUiChatFormComponent;
|
||||
|
||||
|
@ -1737,6 +1741,12 @@ export class MessagesComponent implements OnInit, OnDestroy, AfterViewInit {
|
|||
this.searchedListSubject.next([]);
|
||||
this.searchedFocusEvent = null;
|
||||
this.searchText = '';
|
||||
} else {
|
||||
setTimeout(() => {
|
||||
if (!!this.chatSearch) {
|
||||
this.chatSearch.setFocus();
|
||||
}
|
||||
}, 500);
|
||||
}
|
||||
}
|
||||
onCloseSearchArea() {
|
||||
|
|
|
@ -1,4 +1,12 @@
|
|||
import { Component, OnInit, Input, Output, EventEmitter } from '@angular/core';
|
||||
import {
|
||||
Component,
|
||||
OnInit,
|
||||
Input,
|
||||
Output,
|
||||
EventEmitter,
|
||||
ElementRef,
|
||||
ViewChild
|
||||
} from '@angular/core';
|
||||
import { FormGroup, FormBuilder } from '@angular/forms';
|
||||
import { NGXLogger } from 'ngx-logger';
|
||||
|
||||
|
@ -24,6 +32,8 @@ export class SearchComponent implements OnInit {
|
|||
@Output()
|
||||
closeSearchArea = new EventEmitter();
|
||||
|
||||
@ViewChild('inputSearch', { static: false }) inputSearch: ElementRef;
|
||||
|
||||
fgSearch: FormGroup;
|
||||
isSearch = false;
|
||||
|
||||
|
@ -62,4 +72,8 @@ export class SearchComponent implements OnInit {
|
|||
onClickSearchAndPrev() {
|
||||
this.searchAndPrev.emit();
|
||||
}
|
||||
|
||||
setFocus() {
|
||||
this.inputSearch.nativeElement.focus();
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue
Block a user