diff --git a/platform/viewer/src/routes/WorkList/WorkList.jsx b/platform/viewer/src/routes/WorkList/WorkList.jsx index d42f775d5..fc8fa1223 100644 --- a/platform/viewer/src/routes/WorkList/WorkList.jsx +++ b/platform/viewer/src/routes/WorkList/WorkList.jsx @@ -45,6 +45,7 @@ function WorkList({ history, data: studies, isLoadingData, dataSource }) { const debouncedFilterValues = useDebounce(filterValues, 200); const { resultsPerPage, pageNumber, sortBy, sortDirection } = filterValues; + let dynamicFilterValues = {}; const sortedStudies = studies // TOOD: Move sort to DataSourceWrapper? // TODO: MOTIVATION, this is triggered on every render, even if list/sort does not change @@ -54,7 +55,10 @@ function WorkList({ history, data: studies, isLoadingData, dataSource }) { if (noSortApplied && studies.length < 101) { const ascendingSortModifier = -1; - + dynamicFilterValues = { + sortBy: 'studyDate', + sortDirection: 'ascending', + }; return _sortStringDates(s1, s2, ascendingSortModifier); } else if (noSortApplied) { return 0; @@ -216,8 +220,8 @@ function WorkList({ history, data: studies, isLoadingData, dataSource }) { content: patientName ? ( {patientName} ) : ( - (Empty) - ), + (Empty) + ), gridCol: 4, }, { @@ -281,13 +285,13 @@ function WorkList({ history, data: studies, isLoadingData, dataSource }) { seriesTableDataSource={ seriesInStudiesMap.has(studyInstanceUid) ? seriesInStudiesMap.get(studyInstanceUid).map(s => { - return { - description: s.description || '(empty)', - seriesNumber: s.seriesNumber || '', - modality: s.modality || '', - instances: s.numSeriesInstances || '', - }; - }) + return { + description: s.description || '(empty)', + seriesNumber: s.seriesNumber || '', + modality: s.modality || '', + instances: s.numSeriesInstances || '', + }; + }) : [] } > @@ -304,7 +308,7 @@ function WorkList({ history, data: studies, isLoadingData, dataSource }) { @@ -353,7 +357,7 @@ function WorkList({ history, data: studies, isLoadingData, dataSource }) { setFilterValues(defaultFilterValues)} isFiltering={isFiltering(filterValues, defaultFilterValues)} @@ -376,10 +380,10 @@ function WorkList({ history, data: studies, isLoadingData, dataSource }) { /> ) : ( -
- -
- )} +
+ +
+ )} ); }