From e00ecb2ff331c2ff2afc1831351e6317b25a6add Mon Sep 17 00:00:00 2001 From: Joe Reuter Date: Tue, 12 Feb 2019 13:50:58 +0100 Subject: [PATCH] Expand add panels flyout and increase default rows per page (#30508) --- .../dashboard/top_nav/__snapshots__/add_panel.test.js.snap | 2 +- .../kibana/public/dashboard/top_nav/add_panel.js | 1 - .../public/saved_objects/components/saved_object_finder.tsx | 6 ++++-- 3 files changed, 5 insertions(+), 4 deletions(-) diff --git a/src/legacy/core_plugins/kibana/public/dashboard/top_nav/__snapshots__/add_panel.test.js.snap b/src/legacy/core_plugins/kibana/public/dashboard/top_nav/__snapshots__/add_panel.test.js.snap index 379eb82f438ec..d84517a1beccf 100644 --- a/src/legacy/core_plugins/kibana/public/dashboard/top_nav/__snapshots__/add_panel.test.js.snap +++ b/src/legacy/core_plugins/kibana/public/dashboard/top_nav/__snapshots__/add_panel.test.js.snap @@ -8,7 +8,7 @@ exports[`render 1`] = ` maxWidth={false} onClose={[Function]} ownFocus={true} - size="s" + size="m" > diff --git a/src/legacy/ui/public/saved_objects/components/saved_object_finder.tsx b/src/legacy/ui/public/saved_objects/components/saved_object_finder.tsx index 49a775d99b40e..c8b9258c53d32 100644 --- a/src/legacy/ui/public/saved_objects/components/saved_object_finder.tsx +++ b/src/legacy/ui/public/saved_objects/components/saved_object_finder.tsx @@ -62,6 +62,7 @@ interface SavedObjectFinderUIProps extends InjectedIntlProps { noItemsMessage?: React.ReactNode; savedObjectType: 'visualization' | 'search'; visTypes?: VisTypesRegistryProvider; + initialPageSize?: 5 | 10 | 15; } class SavedObjectFinderUI extends React.Component< @@ -75,6 +76,7 @@ class SavedObjectFinderUI extends React.Component< noItemsMessage: PropTypes.node, savedObjectType: PropTypes.oneOf(['visualization', 'search']).isRequired, visTypes: PropTypes.object, + initialPageSize: PropTypes.number, }; private isComponentMounted: boolean = false; @@ -133,7 +135,7 @@ class SavedObjectFinderUI extends React.Component< items: [], isFetchingItems: false, page: 0, - perPage: 10, + perPage: props.initialPageSize || 15, filter: '', }; } @@ -253,7 +255,7 @@ class SavedObjectFinderUI extends React.Component< pageIndex: this.state.page, pageSize: this.state.perPage, totalItemCount: this.state.items.length, - pageSizeOptions: [5, 10], + pageSizeOptions: [5, 10, 15], }; // TODO there should be a Type in EUI for that, replace if it exists const sorting: { sort?: EuiTableCriteria['sort'] } = {};