Skip to content

Commit

Permalink
Fix initial page size and listing limit
Browse files Browse the repository at this point in the history
Signed-off-by: abbyhu2000 <[email protected]>
  • Loading branch information
abbyhu2000 committed May 31, 2023
1 parent 1332d43 commit 34c0e74
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,8 @@ export const DashboardListing = () => {
const dashboardProvidersForListing = dashboardProviders() || {};

const dashboardListTypes = Object.keys(dashboardProvidersForListing);
const initialPageSize = savedObjectsPublic.settings.getListingLimit();
const initialPageSize = savedObjectsPublic.settings.getPerPage();
const listingLimit = savedObjectsPublic.settings.getListingLimit();

const mapListAttributesToDashboardProvider = (obj: any) => {
const provider = dashboardProvidersForListing[obj.type];
Expand Down Expand Up @@ -138,7 +139,7 @@ export const DashboardListing = () => {
deleteItems={hideWriteControls ? undefined : deleteItems}
editItem={hideWriteControls ? undefined : editItem}
tableColumns={tableColumns}
listingLimit={savedObjectsPublic.settings.getListingLimit()}
listingLimit={listingLimit}
initialFilter={''}
initialPageSize={initialPageSize}
noItemsFragment={noItemsFragment}
Expand Down
2 changes: 1 addition & 1 deletion src/plugins/dashboard/public/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -241,7 +241,7 @@ export interface DashboardServices extends CoreStart {
navigation: NavigationStart;
savedObjectsClient: SavedObjectsClientContract;
savedDashboards: SavedObjectLoader;
dashboardProviders?: () => { [key: string]: DashboardProvider };
dashboardProviders: () => { [key: string]: DashboardProvider } | undefined;
dashboardConfig: OpenSearchDashboardsLegacyStart['dashboardConfig'];
dashboardCapabilities: DashboardCapabilities;
embeddableCapabilities: {
Expand Down

0 comments on commit 34c0e74

Please sign in to comment.