diff --git a/packages/shared-ux/table_persist/README.md b/packages/shared-ux/table_persist/README.md index 4c5541ea616a9..08688990ce450 100644 --- a/packages/shared-ux/table_persist/README.md +++ b/packages/shared-ux/table_persist/README.md @@ -11,6 +11,10 @@ for use across tables in Kibana Stack Management for consistency. Usage: ``` +interface Props { + items: T[]; +} + const MyTableComponent: FunctionComponent = ({ items }) => { const columns = [ { @@ -21,7 +25,7 @@ const MyTableComponent: FunctionComponent = ({ items }) => { ... ]; - const { pageSize, sort, onTableChange } = useEuiTablePersist({ + const { pageSize, sorting, onTableChange } = useEuiTablePersist({ tableId: 'myTableId', initialPageSize: 50, initialSort: { @@ -40,7 +44,7 @@ const MyTableComponent: FunctionComponent = ({ items }) => { items={items} columns={columns} pagination={pagination} - sorting={{ sort }} + sorting={sorting} /> ); };