Skip to content

Commit

Permalink
Update readme
Browse files Browse the repository at this point in the history
  • Loading branch information
ElenaStoeva committed Aug 8, 2024
1 parent 228813c commit ada6dd7
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions packages/shared-ux/table_persist/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,10 @@ for use across tables in Kibana Stack Management for consistency.
Usage:

```
interface Props {
items: T[];
}
const MyTableComponent: FunctionComponent<Props> = ({ items }) => {
const columns = [
{
Expand All @@ -21,7 +25,7 @@ const MyTableComponent: FunctionComponent<Props> = ({ items }) => {
...
];
const { pageSize, sort, onTableChange } = useEuiTablePersist({
const { pageSize, sorting, onTableChange } = useEuiTablePersist<T>({
tableId: 'myTableId',
initialPageSize: 50,
initialSort: {
Expand All @@ -40,7 +44,7 @@ const MyTableComponent: FunctionComponent<Props> = ({ items }) => {
items={items}
columns={columns}
pagination={pagination}
sorting={{ sort }}
sorting={sorting}
/>
);
};
Expand Down

0 comments on commit ada6dd7

Please sign in to comment.