# 시험결과분석 46

This commit is contained in:
leejinho 2020-02-10 14:10:40 +09:00
parent 515b0135f8
commit 3298542f04
3 changed files with 30 additions and 3 deletions

View File

@ -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

View File

@ -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() {

View File

@ -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();
}
}