Skip to content

Commit 8051c5d

Browse files
committed
fix(*) <> and useCustom types
1 parent 97a9b1f commit 8051c5d

File tree

6 files changed

+9
-9
lines changed

6 files changed

+9
-9
lines changed

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@table-library/react-table-library",
3-
"version": "2.0.24",
3+
"version": "2.0.30",
44
"description": "react-table-library",
55
"type": "module",
66
"main": "main.js",

src/compact/CompactRow.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ export const CompactRow: React.FC<CompactRowProps> = ({
2828
const { tree, select } = tableProps;
2929

3030
return (
31-
<>
31+
<React.Fragment>
3232
{rowOptions?.renderBeforeRow && rowOptions.renderBeforeRow(item)}
3333

3434
<Row item={item} {...rowProps}>
@@ -87,6 +87,6 @@ export const CompactRow: React.FC<CompactRowProps> = ({
8787
</Row>
8888

8989
{rowOptions?.renderAfterRow && rowOptions.renderAfterRow(item)}
90-
</>
90+
</React.Fragment>
9191
);
9292
};

src/compact/CompactTable.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ export const CompactTable: React.FC<CompactTableProps> = React.forwardRef(
6363
onInit={onInit}
6464
>
6565
{(tableList: TableNode[]) => (
66-
<>
66+
<React.Fragment>
6767
{tableOptions?.renderBeforeTable && tableOptions.renderBeforeTable()}
6868
{virtualizedOptions ? (
6969
<VirtualizedTable
@@ -87,7 +87,7 @@ export const CompactTable: React.FC<CompactTableProps> = React.forwardRef(
8787
<CompactFooter columns={columns} />
8888
)}
8989
{tableOptions?.renderAfterTable && tableOptions.renderAfterTable()}
90-
</>
90+
</React.Fragment>
9191
)}
9292
</Table>
9393
);

src/compact/NormalTable.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ export const NormalTable: React.FC<NormalTableProps> = ({
1616
...tableProps
1717
}: NormalTableProps) => {
1818
return (
19-
<>
19+
<React.Fragment>
2020
<CompactHeader columns={columns} {...tableProps} />
2121

2222
<Body>
@@ -31,6 +31,6 @@ export const NormalTable: React.FC<NormalTableProps> = ({
3131
/>
3232
))}
3333
</Body>
34-
</>
34+
</React.Fragment>
3535
);
3636
};

src/table/Table/index.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,7 @@ const Table: React.FC<TableProps> = React.forwardRef(
101101
<TreeContext.Provider value={tree}>
102102
<PaginationContext.Provider value={pagination}>
103103
{layout?.inheritLayout ? (
104-
<>{children && children(modifiedNodes)}</>
104+
<React.Fragment>{children && children(modifiedNodes)}</React.Fragment>
105105
) : (
106106
<LayoutProvider
107107
layout={layout}

src/table/useCustom/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ const reducer = (state: State, action: Action) => {
2929

3030
const DEFAULT_STATE = {};
3131

32-
const useCustom = (name: string, data: Data, primary: StateAndChange | Nullish, context: any) => {
32+
const useCustom = (name: string, data: Data, primary: StateAndChange | Nullish, context?: any) => {
3333
const controlledState: State = primary?.state
3434
? { ...DEFAULT_STATE, ...primary.state }
3535
: { ...DEFAULT_STATE };

0 commit comments

Comments
 (0)