쪽지 검색 후 x 버튼 클릭시 이전 탭으로 이동되도록 수정.

This commit is contained in:
leejinho 2020-01-14 08:26:27 +09:00
parent cf2bb3987d
commit db974a2b8d
4 changed files with 18 additions and 4 deletions

View File

@ -37,7 +37,7 @@
</form> </form>
</div> </div>
</div> </div>
<div *ngIf="!isSearch" class="message-section"> <div class="message-section" [style.display]="isSearch ? 'none' : 'block'">
<mat-tab-group <mat-tab-group
#tabs #tabs
mat-stretch-tabs mat-stretch-tabs
@ -88,7 +88,7 @@
</mat-tab-group> </mat-tab-group>
</div> </div>
<div *ngIf="isSearch"> <div [style.display]="isSearch ? 'block' : 'none'">
<div class="search-sub"> <div class="search-sub">
<form [formGroup]="fgSearchType" class="w-100-p"> <form [formGroup]="fgSearchType" class="w-100-p">
<mat-form-field> <mat-form-field>

View File

@ -291,7 +291,8 @@ export class MessageBoxComponent
} }
onClickSearchCancel() { onClickSearchCancel() {
this.isSearch = false; this.isSearch = false;
this.getRetrieveMessage(MessageType.Receive, 0); this.store.dispatch(MessageStore.clearSearchMessage({}));
// this.getRetrieveMessage(MessageType.Receive, 0);
} }
/** 쪽지 타입별 조회 */ /** 쪽지 타입별 조회 */

View File

@ -117,3 +117,8 @@ export const cancelReservationMessageFailure = createAction(
'[Messenger::Message] Cancel Reservation Message Failure', '[Messenger::Message] Cancel Reservation Message Failure',
props<{ error: any }>() props<{ error: any }>()
); );
export const clearSearchMessage = createAction(
'[Messenger::Message] Clear Search Message',
props()
);

View File

@ -17,7 +17,8 @@ import {
cancelReservationMessageSuccess, cancelReservationMessageSuccess,
detailMessageSuccess, detailMessageSuccess,
detailMessageClear, detailMessageClear,
detailMessage detailMessage,
clearSearchMessage
} from './actions'; } from './actions';
import { MessageType } from '@ucap-webmessenger/api-message'; import { MessageType } from '@ucap-webmessenger/api-message';
@ -141,6 +142,13 @@ export const reducer = createReducer(
} }
}), }),
on(clearSearchMessage, state => {
return {
...state,
searchList: adapterSearchList.removeAll(state.searchList)
};
}),
on(cancelReservationMessageSuccess, (state, action) => { on(cancelReservationMessageSuccess, (state, action) => {
return { return {
...state, ...state,