Skip to content

Commit

Permalink
[revert me]
Browse files Browse the repository at this point in the history
  • Loading branch information
chandlerprall committed Oct 21, 2021
1 parent 4eb6746 commit 6427142
Showing 1 changed file with 17 additions and 9 deletions.
26 changes: 17 additions & 9 deletions src-docs/src/views/datagrid/datagrid.js
Original file line number Diff line number Diff line change
Expand Up @@ -400,25 +400,33 @@ export default () => {
console.log(eventData);
});

const [rowCount, setRowCount] = useState(5);

return (
<DataContext.Provider value={raw_data}>
<EuiDataGrid
aria-label="Data grid demo"
columns={columns}
columnVisibility={{ visibleColumns, setVisibleColumns }}
trailingControlColumns={trailingControlColumns}
rowCount={raw_data.length}
rowCount={rowCount}
renderCellValue={renderCellValue}
inMemory={{ level: 'sorting' }}
sorting={{ columns: sortingColumns, onSort }}
pagination={{
...pagination,
pageSizeOptions: [10, 50, 100],
onChangeItemsPerPage: onChangeItemsPerPage,
onChangePage: onChangePage,
}}
// inMemory={{ level: 'sorting' }}
// sorting={{ columns: sortingColumns, onSort }}
// pagination={{
// ...pagination,
// pageSizeOptions: [10, 50, 100],
// onChangeItemsPerPage: onChangeItemsPerPage,
// onChangePage: onChangePage,
// }}
onColumnResize={onColumnResize.current}
/>
<EuiButton onClick={() => setRowCount((rowCount) => rowCount + 5)}>
+5
</EuiButton>
<EuiButton onClick={() => setRowCount((rowCount) => rowCount - 5)}>
-5
</EuiButton>
</DataContext.Provider>
);
};

0 comments on commit 6427142

Please sign in to comment.