Skip to content

Commit

Permalink
Expand add panels flyout and increase default rows per page (#30508)
Browse files Browse the repository at this point in the history
  • Loading branch information
flash1293 authored Feb 12, 2019
1 parent eec981c commit e00ecb2
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ exports[`render 1`] = `
maxWidth={false}
onClose={[Function]}
ownFocus={true}
size="s"
size="m"
>
<EuiFlyoutBody>
<EuiTitle
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,6 @@ class DashboardAddPanelUi extends React.Component {
<EuiFlyout
ownFocus
onClose={this.props.onClose}
size="s"
data-test-subj="dashboardAddPanel"
>
<EuiFlyoutBody>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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<
Expand All @@ -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;
Expand Down Expand Up @@ -133,7 +135,7 @@ class SavedObjectFinderUI extends React.Component<
items: [],
isFetchingItems: false,
page: 0,
perPage: 10,
perPage: props.initialPageSize || 15,
filter: '',
};
}
Expand Down Expand Up @@ -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'] } = {};
Expand Down

0 comments on commit e00ecb2

Please sign in to comment.