diff --git a/client/src/app/instance/store/reducers/cone-search.reducer.spec.ts b/client/src/app/instance/store/reducers/cone-earch.reducer.spec.ts similarity index 100% rename from client/src/app/instance/store/reducers/cone-search.reducer.spec.ts rename to client/src/app/instance/store/reducers/cone-earch.reducer.spec.ts diff --git a/client/src/app/instance/store/reducers/search.reducer.ts b/client/src/app/instance/store/reducers/search.reducer.ts index ee7d006a215d73bd0c44ac1a75b98bc4233f2f06..e81da50750d1d573e65d2d3e307ef8408b147a5d 100644 --- a/client/src/app/instance/store/reducers/search.reducer.ts +++ b/client/src/app/instance/store/reducers/search.reducer.ts @@ -12,6 +12,11 @@ import { createReducer, on } from '@ngrx/store'; import { Criterion } from '../models'; import * as searchActions from '../actions/search.actions'; +/** + * Interface for search state. + * + * @interface State + */ export interface State { pristine: boolean; currentDataset: string, @@ -92,7 +97,7 @@ export const searchReducer = createReducer( ...state, criteriaList: [...state.criteriaList.filter(c => c.id !== idCriterion)] })), - on(searchActions.updateOutputList, (state, { outputList}) => ({ + on(searchActions.updateOutputList, (state, { outputList }) => ({ ...state, outputList })), @@ -136,7 +141,7 @@ export const searchReducer = createReducer( })), on(searchActions.destroyResults, state => ({ ...state, - searchData: [], + data: [], dataLength: null })), on(searchActions.resetSearch, () => ({