forked from AdrianBZG/InterMine-Data-Browser-Tool
-
Notifications
You must be signed in to change notification settings - Fork 33
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
To prevent excessive network calls, this commit caches the retrieved table rows into a `Map` of pages. It will fetch the total cache factor, which is the amount of pages a user wishes to retrieve per request. The cache is not currently limited to a max size, and is busted with every new query. The user now has 3 options for navigating the table forwards or backwards. 1. next/previous page 2. first/last page 3. direct page number input The page navigation click events are debounced. This prevents having the user wait on the results of fetching new results when they reach a page that is not cached. Closes: #99 Squashed commits: * Display row count information * Start a cache from the initial table row results * Navigate forward if page exists in the cache * Navigate backwards if page exists in the cache * Fetch next set of rows when navigating forward and page not cached * Reset the page number when updating the query * Enable changing pages by inputting a number * Display total number of pages * Add buttons to skip to 1st and last page * Fetch next set of rows when navigating backward and page not cached * Bust the cache when fetching new queries * Debounce successive page navigation click events
- Loading branch information
Showing
11 changed files
with
552 additions
and
64 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,15 @@ | ||
// This file is only used from the command line for packages that require it | ||
// like stylelint. It must be kept in sync with craco's modifications of create-react-app | ||
{ | ||
"presets": ["react-app"] | ||
"presets": ["react-app"], | ||
"plugins": [ | ||
[ | ||
"import", | ||
{ | ||
"libraryName": "react-use", | ||
"libraryDirectory": "lib", | ||
"camel2DashComponentName": false | ||
} | ||
] | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.