From f384306a8cec34819ca3a1d62c98174a0fddfaa2 Mon Sep 17 00:00:00 2001 From: Michael Baudis Date: Wed, 5 Jun 2024 10:00:37 +0200 Subject: [PATCH] removing server provided pagination We need to replace pagination by a client driven mechanism (e.g. generate list of links from accessid and entity count or through a separate form page which has the accessid & allows selection of entity and limit/skip...). --- .../searchResults/DatasetResultBox.js | 47 ++++++++++--------- src/hooks/api.js | 1 + 2 files changed, 27 insertions(+), 21 deletions(-) diff --git a/src/components/searchResults/DatasetResultBox.js b/src/components/searchResults/DatasetResultBox.js index 91b47c04..ec5d0d1d 100644 --- a/src/components/searchResults/DatasetResultBox.js +++ b/src/components/searchResults/DatasetResultBox.js @@ -119,25 +119,25 @@ export function DatasetResultBox({ data: responseSet, query }) { tabComponent = ( ) - } else if (selectedTab === TABS.samplesMap) { - tabComponent = ( -
-

Sample Origins

-

- The map represents the origins of the matched samples, as derived from - the original publication or resource repository. In the majority of - cases this will correspond to the proxy information of the - corresponding author's institution. Additional information can be - found in the{" "} - - {"."} -

- {/**/} -
- ) + // } else if (selectedTab === TABS.samplesMap) { + // tabComponent = ( + //
+ //

Sample Origins

+ //

+ // The map represents the origins of the matched samples, as derived from + // the original publication or resource repository. In the majority of + // cases this will correspond to the proxy information of the + // corresponding author's institution. Additional information can be + // found in the{" "} + // + // {"."} + //

+ // {/**/} + //
+ // ) } else if (selectedTab === TABS.variants) { tabComponent = ( @@ -225,9 +225,13 @@ export function DatasetResultBox({ data: responseSet, query }) { ) : null} {tabComponent ?
{tabComponent}
: null} -
+{/* + // TODO:Implement paginated downloads, e.g. on separate form + // page with hidden accessid ... parameters and fields for + // limit / skip ... +
- {biosamplesTableHandover?.pages && ( + {biosamplesTableHandover?.pages && (
Download Sample Data (TSV) @@ -305,6 +309,7 @@ export function DatasetResultBox({ data: responseSet, query }) {
)} +*/} ) } diff --git a/src/hooks/api.js b/src/hooks/api.js index 5e822a6b..418500b8 100644 --- a/src/hooks/api.js +++ b/src/hooks/api.js @@ -374,6 +374,7 @@ export function useCollations({ datasetIds, method, filters }) { } export function useFiltersByType({ datasetIds, method, mode, collationTypes }) { + // TODO: construct URL w/o optional parameters if empty const url = `${SITE_DEFAULTS.API_PATH}beacon/filtering_terms/?datasetIds=${datasetIds}&method=${method}&mode=${mode}&collationTypes=${collationTypes}` return useProgenetixApi(url) }