File tree Expand file tree Collapse file tree 2 files changed +8
-6
lines changed
Expand file tree Collapse file tree 2 files changed +8
-6
lines changed Original file line number Diff line number Diff line change 11import Tab from '@mui/material/Tab' ;
22import Tabs from '@mui/material/Tabs' ;
3+ import useOnMount from '@mui/utils/useOnMount'
34import * as React from 'react' ;
45import { Box , Button } from '@mui/material' ;
5- import { useEffect , useState , useRef } from 'react' ;
6+ import { useEffect , useState } from 'react' ;
67import { isEmpty } from 'lodash' ;
78import { TerraDataRepo } from '../../libs/ajax/TerraDataRepo' ;
89import { DatasetSearchTableDisplay } from './DatasetSearchTableDisplay' ;
@@ -195,12 +196,12 @@ export const DatasetSearchTable = (props) => {
195196 }
196197 } ;
197198
198- useEffect ( ( ) => {
199- if ( isEmpty ( filtered ) ) {
199+ useOnMount ( ( ) => {
200+ if ( isEmpty ( datasets ) ) {
200201 return ;
201202 }
202- getExportableDatasets ( filtered ) ;
203- } , [ filtered ] ) ;
203+ getExportableDatasets ( datasets ) ;
204+ } ) ;
204205
205206 useEffect ( ( ) => {
206207 setFiltered ( datasets ) ;
Original file line number Diff line number Diff line change @@ -18,7 +18,8 @@ export const TerraDataRepo = {
1818 } ;
1919 const rootTdrApiUrl = await Config . getTdrApiUrl ( ) ;
2020 const snapshotPromises = partitionedIdentifiers . map ( sublist => {
21- const url = `${ rootTdrApiUrl } /api/repository/v1/snapshots?duosDatasetIds=${ sublist . join ( '&duosDatasetIds=' ) } ` ;
21+ // 1000 should be safe with only 70 DUOS IDs.
22+ const url = `${ rootTdrApiUrl } /api/repository/v1/snapshots?limit=1000&duosDatasetIds=${ sublist . join ( '&duosDatasetIds=' ) } ` ;
2223 return axios . get ( url , Config . authOpts ( ) ) ;
2324 } ) ;
2425 await Promise . all ( snapshotPromises ) . then ( function ( responses ) {
You can’t perform that action at this time.
0 commit comments