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

View File

@ -291,7 +291,8 @@ export class MessageBoxComponent
}
onClickSearchCancel() {
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',
props<{ error: any }>()
);
export const clearSearchMessage = createAction(
'[Messenger::Message] Clear Search Message',
props()
);

View File

@ -17,7 +17,8 @@ import {
cancelReservationMessageSuccess,
detailMessageSuccess,
detailMessageClear,
detailMessage
detailMessage,
clearSearchMessage
} from './actions';
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) => {
return {
...state,