Skip to content

Commit

Permalink
Add container for table.
Browse files Browse the repository at this point in the history
  • Loading branch information
justinkambic committed Jul 19, 2018
1 parent e1112cf commit cca5bc0
Showing 1 changed file with 23 additions and 17 deletions.
40 changes: 23 additions & 17 deletions x-pack/plugins/beats_management/public/components/beats_table.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
*/

import {
// @ts-ignore
EuiBadge,
EuiButton,
EuiContextMenu,
Expand All @@ -17,6 +16,7 @@ import {
EuiPopover,
} from '@elastic/eui';
import React from 'react';
import styled from 'styled-components';
import { CMPopulatedBeat } from '../../common/domain_types';

const columns = [
Expand Down Expand Up @@ -73,6 +73,10 @@ interface BeatsTableState {
isBulkPopoverOpen: boolean;
}

const TableContainer = styled.div`
padding: 16px;
`;

export class BeatsTable extends React.Component<BeatsTableProps, BeatsTableState> {
constructor(props: BeatsTableProps) {
super(props);
Expand Down Expand Up @@ -168,22 +172,24 @@ export class BeatsTable extends React.Component<BeatsTableProps, BeatsTableState
};

return (
<EuiInMemoryTable
columns={columns}
items={items.map((beat, index) => {
return {
...beat,
key: `beat${index}`,
};
})}
itemId="id"
isSelectable={true}
pagination={pagination}
responsive={true}
search={search}
selection={selectionOptions}
sorting={true}
/>
<TableContainer>
<EuiInMemoryTable
columns={columns}
items={items.map((beat, index) => {
return {
...beat,
key: `beat${index}`,
};
})}
itemId="id"
isSelectable={true}
pagination={pagination}
responsive={true}
search={search}
selection={selectionOptions}
sorting={true}
/>
</TableContainer>
);
}

Expand Down

0 comments on commit cca5bc0

Please sign in to comment.