From 3825ce609e6d89b2b40e2a84e405a167983709ef Mon Sep 17 00:00:00 2001 From: Nikola Andreev Date: Sat, 23 Jan 2021 16:58:05 +0100 Subject: [PATCH] Fixed bug with deleting rows with validators --- src/moveFieldState.js | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/src/moveFieldState.js b/src/moveFieldState.js index c1219ea..8521a79 100644 --- a/src/moveFieldState.js +++ b/src/moveFieldState.js @@ -17,16 +17,19 @@ function moveFieldState( change: oldState.fields[destKey] && oldState.fields[destKey].change, blur: oldState.fields[destKey] && oldState.fields[destKey].blur, focus: oldState.fields[destKey] && oldState.fields[destKey].focus, + validators: oldState.fields[destKey] && oldState.fields[destKey].validators, + validateFields: + oldState.fields[destKey] && oldState.fields[destKey].validateFields, lastFieldState: undefined // clearing lastFieldState forces renotification } if (!state.fields[destKey].change) { - delete state.fields[destKey].change; + delete state.fields[destKey].change } if (!state.fields[destKey].blur) { - delete state.fields[destKey].blur; + delete state.fields[destKey].blur } if (!state.fields[destKey].focus) { - delete state.fields[destKey].focus; + delete state.fields[destKey].focus } }