From 217dab1e9e409d77b0a48ad70750e18537e62220 Mon Sep 17 00:00:00 2001 From: Tifenn Guillas Date: Mon, 12 Oct 2020 15:06:49 +0200 Subject: [PATCH] Remove automatic datasets selection => DONE --- .../store/search-multiple.effects.ts | 32 +++++++++---------- 1 file changed, 16 insertions(+), 16 deletions(-) diff --git a/src/app/search-multiple/store/search-multiple.effects.ts b/src/app/search-multiple/store/search-multiple.effects.ts index f3d41e8..3610939 100644 --- a/src/app/search-multiple/store/search-multiple.effects.ts +++ b/src/app/search-multiple/store/search-multiple.effects.ts @@ -62,22 +62,22 @@ export class SearchMultipleEffects { }) ); - @Effect() - loadDatasetSearchMetaSuccessAction$ = this.actions$.pipe( - ofType(datasetActions.LOAD_DATASET_SEARCH_META_SUCCESS), - withLatestFrom(this.store$), - switchMap(([action, state]) => { - if (state.searchMultiple.selectedDatasets.length === 0) { - const loadDatasetSearchMetaSuccessAction = action as datasetActions.LoadDatasetSearchMetaSuccessAction; - const datasetWithConeSearchList: Dataset[] = loadDatasetSearchMetaSuccessAction.payload[1] - .filter(d => d.config.cone_search && d.config.cone_search.enabled === true); - const selectedDatasets: string[] = datasetWithConeSearchList.map(d => d.name); - return of(new searchMultipleActions.InitSelectedDatasetsAction(selectedDatasets)); - } else { - return of({ type: '[No Action] ' + searchMultipleActions.INIT_SELECTED_DATASETS }); - } - }) - ); + // @Effect() + // loadDatasetSearchMetaSuccessAction$ = this.actions$.pipe( + // ofType(datasetActions.LOAD_DATASET_SEARCH_META_SUCCESS), + // withLatestFrom(this.store$), + // switchMap(([action, state]) => { + // if (state.searchMultiple.selectedDatasets.length === 0) { + // const loadDatasetSearchMetaSuccessAction = action as datasetActions.LoadDatasetSearchMetaSuccessAction; + // const datasetWithConeSearchList: Dataset[] = loadDatasetSearchMetaSuccessAction.payload[1] + // .filter(d => d.config.cone_search && d.config.cone_search.enabled === true); + // const selectedDatasets: string[] = datasetWithConeSearchList.map(d => d.name); + // return of(new searchMultipleActions.InitSelectedDatasetsAction(selectedDatasets)); + // } else { + // return of({ type: '[No Action] ' + searchMultipleActions.INIT_SELECTED_DATASETS }); + // } + // }) + // ); @Effect() retrieveDatasetsCountAction$ = this.actions$.pipe( -- GitLab