From d8f7407b004c0cd10018828a28bfde1344ad8a53 Mon Sep 17 00:00:00 2001 From: Florent Chehab Date: Thu, 28 Feb 2019 15:12:01 +0100 Subject: [PATCH] [IMPORTANT] consider prop as usuable when updating or creating. Prevent useless unmounting This is regression that was introduced in the redesign of the crud creation --- frontend/src/components/CustomComponentForAPI.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/frontend/src/components/CustomComponentForAPI.js b/frontend/src/components/CustomComponentForAPI.js index 926e28ed..df4c60b6 100644 --- a/frontend/src/components/CustomComponentForAPI.js +++ b/frontend/src/components/CustomComponentForAPI.js @@ -98,7 +98,7 @@ class CustomComponentForAPI extends Component { && successActionsWithReads .filter(action => action in prop) // general handling of all types of API reducers .some(action => prop[action].readAt !== 0) // makes sure will consider all success actions - && ["isReading", "isUpdating", "isCreating"] + && ["isReading"]//, "isUpdating", "isCreating"] Don't put those in here it may cause unwanted rerendering whole tree when saving .filter(action => action in prop) .every(action => prop[action] === false); } -- GitLab