Skip to content

Commit 91a7a20

Browse files
authored
Fix onCreatingRowSave return type to match documentation (#1311)
In documentation (https://www.material-react-table.com/docs/api/table-options) both `onCreatingRowSave` and `onEditingRowSave` should accept a function with a return type of `Promise<void> | void` but in the typings the `onCreatingRowSave` accepts only `void`.
1 parent c1b447a commit 91a7a20

File tree

1 file changed

+1
-1
lines changed
  • packages/material-react-table/src

1 file changed

+1
-1
lines changed

packages/material-react-table/src/types.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1196,7 +1196,7 @@ export interface MRT_TableOptions<TData extends MRT_RowData>
11961196
row: MRT_Row<TData>;
11971197
table: MRT_TableInstance<TData>;
11981198
values: Record<LiteralUnion<string & DeepKeys<TData>>, any>;
1199-
}) => void;
1199+
}) => Promise<void> | void;
12001200
onDensityChange?: OnChangeFn<MRT_DensityState>;
12011201
onDraggingColumnChange?: OnChangeFn<MRT_Column<TData> | null>;
12021202
onDraggingRowChange?: OnChangeFn<MRT_Row<TData> | null>;

0 commit comments

Comments
 (0)