Skip to content

Commit ad062be

Browse files
committed
fix: -
1 parent af962c7 commit ad062be

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

src/ProTableEdit/index.tsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,8 @@ export default function ProTableEdit<T = any>(props: ProTableEditProps<T>) {
7070
props?.editActionRef,
7171
() => {
7272
return {
73-
open() {
73+
open(v) {
74+
v && (initDataRef.current = v);
7475
setOpen(true);
7576
},
7677
close() {

src/ProTableEdit/typing.d.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@ interface editActionRefProps<
8888
T extends Record<string, any> = Record<string, any>,
8989
> extends ActionType {
9090
/** 打开编辑框 */
91-
open: () => void;
91+
open: (v: T & Record<string, any>) => void;
9292
/** 关闭编辑框 */
9393
close: () => void;
9494
/**

0 commit comments

Comments
 (0)