Skip to content

Commit

Permalink
Merge pull request rancher#10387 from richard-cox/fix-incremental-loa…
Browse files Browse the repository at this point in the history
…ding

Fix incremental loading
  • Loading branch information
richard-cox authored Feb 8, 2024
2 parents e83334a + ba2ae40 commit b161ed7
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions shell/plugins/dashboard-store/actions.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ import { classify } from '@shell/plugins/dashboard-store/classify';
import { normalizeType } from './normalize';
import garbageCollect from '@shell/utils/gc/gc';
import { addSchemaIndexFields } from '@shell/plugins/steve/schema.utils';
import { addParam } from '@shell/utils/url';

export const _ALL = 'all';
export const _MERGE = 'merge';
Expand Down Expand Up @@ -208,12 +209,12 @@ export default {

const pageFetchOpts = {
...opt,
url: `${ opt.url }?limit=${ opt.incremental }`
url: addParam(opt.url, 'limit', `${ opt.incremental }`),
};

// this is where we "hijack" the limit for the dispatch('request') some lines below
// and therefore have 2 initial requests in parallel
opt.url = `${ opt.url }?limit=100`;
opt.url = addParam(opt.url, 'limit', '100');
skipHaveAll = true;

// since we are forcing a request, clear the haveAll
Expand Down

0 comments on commit b161ed7

Please sign in to comment.