mirror of
https://github.com/Syngnat/GoNavi.git
synced 2026-05-22 08:50:17 +08:00
🐛 fix(data-grid): 修复日期时间字段二次编辑时日历残留上次选择日期标记
- Form.Item 默认 preserve={true},DatePicker 卸载后表单仍保留旧 dayjs 值
- 再次进入编辑时 DatePicker 读取到残留值,导致日历面板显示上次选择的日期圆圈
- 设置 preserve={false} 确保每次编辑态卸载后清除字段值,消除残留标记
- refs #290
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user