🐛 fix(data-grid): 修复日期时间字段二次编辑时日历残留上次选择日期标记

- Form.Item 默认 preserve={true},DatePicker 卸载后表单仍保留旧 dayjs 值
- 再次进入编辑时 DatePicker 读取到残留值,导致日历面板显示上次选择的日期圆圈
- 设置 preserve={false} 确保每次编辑态卸载后清除字段值,消除残留标记
- refs #290
This commit is contained in:
Syngnat
2026-04-01 14:53:44 +08:00
parent e464c2cce1
commit 2c2baca69f

View File

@@ -637,7 +637,7 @@ const EditableCell: React.FC<EditableCellProps> = React.memo(({
if (editable) {
childNode = editing ? (
<Form.Item style={{ margin: 0 }} name={getCellFieldName(record, dataIndex)}>
<Form.Item style={{ margin: 0 }} name={getCellFieldName(record, dataIndex)} preserve={false}>
{isDateTimeField ? (
pickerType === 'time' ? (
<TimePicker