fix: #1414
This commit is contained in:
@@ -38,7 +38,11 @@ const useField = <T extends unknown>(options: Options): FieldType<T> => {
|
||||
|
||||
if (!modified && !disableModifyingForm) {
|
||||
if (typeof setModified === 'function') {
|
||||
Promise.resolve(() => setModified(true))
|
||||
// Update modified state after field value comes back
|
||||
// to avoid cursor jump caused by state value / DOM mismatch
|
||||
setTimeout(() => {
|
||||
setModified(true);
|
||||
}, 10);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user