Skip to content

Commit

Permalink
Use paginated item lists.
Browse files Browse the repository at this point in the history
With the item list table, this is expected.
  • Loading branch information
manthey committed Oct 4, 2024
1 parent 38ba6ce commit aaa8d99
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 0 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
- Handle a rasterio deprecation ([#1655](../../pull/1655))
- Handle a variation in a bioformats exception ([#1656](../../pull/1656))
- Increase logging slow histograms ([#1658](../../pull/1658))
- Use paginated item lists ([#1664](../../pull/1664))

### Bug Fixes

Expand Down
12 changes: 12 additions & 0 deletions girder/girder_large_image/web_client/views/itemList.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,9 @@ import {wrap} from '@girder/core/utilities/PluginUtils';
import {getApiRoot} from '@girder/core/rest';
import {AccessType} from '@girder/core/constants';
import {formatSize, parseQueryString, splitRoute} from '@girder/core/misc';
import router from '@girder/core/router';
import HierarchyWidget from '@girder/core/views/widgets/HierarchyWidget';
import ItemCollection from '@girder/core/collections/ItemCollection';
import FolderListWidget from '@girder/core/views/widgets/FolderListWidget';
import ItemListWidget from '@girder/core/views/widgets/ItemListWidget';

Expand All @@ -17,6 +19,16 @@ import '../stylesheets/itemList.styl';
import ItemListTemplate from '../templates/itemList.pug';
import {MetadatumWidget, validateMetadataValue} from './metadataWidget';

ItemCollection.prototype.pageLimit = Math.max(250, ItemCollection.prototype.pageLimit);

wrap(HierarchyWidget, 'initialize', function (initialize, settings) {
settings = settings || {};
if (settings.paginated === undefined) {
settings.paginated = true;
}
return initialize.call(this, settings);
});

wrap(HierarchyWidget, 'render', function (render) {
render.call(this);
if (!this.$('#flattenitemlist').length && this.$('.g-item-list-container').length && this.itemListView && this.itemListView.setFlatten) {
Expand Down

0 comments on commit aaa8d99

Please sign in to comment.