Skip to content

Commit

Permalink
feat: ListTable add tableProps which can pass custom table props
Browse files Browse the repository at this point in the history
  • Loading branch information
moonrailgun committed Sep 9, 2023
1 parent 9b3dcfa commit 2e6a611
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 1 deletion.
15 changes: 15 additions & 0 deletions packages/tushan/client/components/list/ListTable.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,20 @@ export interface ListTableProps {
defaultFilter?: FilterPayload;
showTotal?: boolean;
showSizeChanger?: boolean;
/**
* Allow pass table props into table element
*/
tableProps?: Omit<
TableProps,
| 'loading'
| 'columns'
| 'data'
| 'rowKey'
| 'rowSelection'
| 'components'
| 'pagination'
| 'onChange'
>;
action?: {
create?: boolean;
detail?: boolean;
Expand Down Expand Up @@ -208,6 +222,7 @@ export const ListTable: React.FC<ListTableProps> = React.memo((props) => {
setSort(undefined);
}
}}
{...props.tableProps}
/>
);

Expand Down
2 changes: 1 addition & 1 deletion packages/tushan/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "tushan",
"version": "0.3.4",
"version": "0.3.5",
"description": "",
"main": "./index.ts",
"scripts": {
Expand Down

0 comments on commit 2e6a611

Please sign in to comment.