Expand add panels flyout and increase default rows per page (#30508)

This commit is contained in:
Joe Reuter 2019-02-12 13:50:58 +01:00 committed by GitHub
parent eec981c0e2
commit e00ecb2ff3
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 5 additions and 4 deletions

View file

@ -8,7 +8,7 @@ exports[`render 1`] = `
maxWidth={false}
onClose={[Function]}
ownFocus={true}
size="s"
size="m"
>
<EuiFlyoutBody>
<EuiTitle

View file

@ -146,7 +146,6 @@ class DashboardAddPanelUi extends React.Component {
<EuiFlyout
ownFocus
onClose={this.props.onClose}
size="s"
data-test-subj="dashboardAddPanel"
>
<EuiFlyoutBody>

View file

@ -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'] } = {};