Skip to content

Commit

Permalink
[Discover] Fix saved search embeddable pagination (elastic#117507)
Browse files Browse the repository at this point in the history
* [Discover] fix saved search embeddable pagination

* [Discover] fix linting error

Co-authored-by: Kibana Machine <[email protected]>
  • Loading branch information
2 people authored and TinLe committed Nov 20, 2021
1 parent 1f63692 commit 16b613c
Showing 1 changed file with 8 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ import {
} from '@elastic/eui';
import { FormattedMessage } from '@kbn/i18n/react';
import { i18n } from '@kbn/i18n';
import { euiLightVars } from '@kbn/ui-shared-deps-src/theme';

interface ToolBarPaginationProps {
pageSize: number;
Expand All @@ -27,6 +28,11 @@ interface ToolBarPaginationProps {
onPageSizeChange: (size: number) => void;
}

const TOOL_BAR_PAGINATION_STYLES = {
marginLeft: 'auto',
marginRight: euiLightVars.euiSizeL,
};

export const ToolBarPagination = ({
pageSize,
pageCount,
Expand Down Expand Up @@ -61,12 +67,7 @@ export const ToolBarPagination = ({
));

return (
<EuiFlexGroup
justifyContent="spaceBetween"
alignItems="center"
gutterSize="xs"
responsive={false}
>
<EuiFlexGroup alignItems="center" gutterSize="xs" responsive={false}>
<EuiFlexItem grow={false}>
<EuiPopover
button={
Expand All @@ -92,7 +93,7 @@ export const ToolBarPagination = ({
</EuiPopover>
</EuiFlexItem>

<EuiFlexItem grow={false}>
<EuiFlexItem grow={false} style={TOOL_BAR_PAGINATION_STYLES}>
<EuiPagination
aria-label={i18n.translate('discover.docTable.documentsNavigation', {
defaultMessage: 'Documents navigation',
Expand Down

0 comments on commit 16b613c

Please sign in to comment.