From 6803cd1d8c7621006b12e0c2eb77397522587a8c Mon Sep 17 00:00:00 2001 From: Cristhian Zanforlin Lousa Date: Tue, 26 Sep 2023 11:21:30 -0300 Subject: [PATCH] =?UTF-8?q?=F0=9F=90=9B=20fix(dictComponent):=20fix=20useE?= =?UTF-8?q?ffect=20dependency=20to=20onChange=20instead=20of=20value=20to?= =?UTF-8?q?=20prevent=20unnecessary=20re-rendering?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 🐛 fix(keypairListComponent): add rows prop to Textarea components to fix rendering issue 🐛 fix(EditNodeModal): remove unused state variables and fix rendering issue with dict and NestedDict types 🐛 fix(dictAreaModal): fix useEffect dependency to dictObj instead of value to prevent unnecessary re-rendering --- .../src/components/dictComponent/index.tsx | 2 +- .../components/keypairListComponent/index.tsx | 2 + .../src/modals/EditNodeModal/index.tsx | 124 +++++++++--------- .../src/modals/dictAreaModal/index.tsx | 7 +- 4 files changed, 69 insertions(+), 66 deletions(-) diff --git a/src/frontend/src/components/dictComponent/index.tsx b/src/frontend/src/components/dictComponent/index.tsx index 981372506..5596f9b34 100644 --- a/src/frontend/src/components/dictComponent/index.tsx +++ b/src/frontend/src/components/dictComponent/index.tsx @@ -19,7 +19,7 @@ export default function DictComponent({ useEffect(() => { if (value) onChange(value); - }, [value]); + }, [onChange]); return (