Skip to content

Commit

Permalink
fix(table): component EditableProTable actionDeleteRef function Singl…
Browse files Browse the repository at this point in the history
…e row status Locked (ant-design#7124)
  • Loading branch information
varown committed May 25, 2023
1 parent 6d8c301 commit 79c6c93
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion packages/utils/src/useEditableArray/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -969,7 +969,8 @@ export function useEditableArray<RecordType>(
childrenColumnName: props.childrenColumnName || 'children',
};
const res = await props?.onDelete?.(recordKey, editRow);
await cancelEditable(recordKey);
// 不传递 false时,重新form.setFieldsValue同一份静态数据,会导致该行始终处于不可编辑状态
await cancelEditable(recordKey,false);
props.setDataSource(editableRowByKey(actionProps, 'delete'));

return res;
Expand Down

0 comments on commit 79c6c93

Please sign in to comment.