From 7e03a0e3237adb27d7fd9cbb828694195dbc0e50 Mon Sep 17 00:00:00 2001 From: MohammedMaaz Date: Wed, 1 May 2024 12:22:53 +0500 Subject: [PATCH] added logic for cols update through props --- agenta-web/src/components/ServerTable/index.tsx | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/agenta-web/src/components/ServerTable/index.tsx b/agenta-web/src/components/ServerTable/index.tsx index b7a926121b..628472f71a 100644 --- a/agenta-web/src/components/ServerTable/index.tsx +++ b/agenta-web/src/components/ServerTable/index.tsx @@ -74,11 +74,11 @@ const ServerTable = ( const setHiddenCols = (cols: string[]) => _setHiddenCols(cols.join(",")) const total = useRef(0) - // useDeepCompareEffect(() => { - // setColumns( - // (props.columns || []).map((item) => ({...item, width: item.width})) as DataCol[], - // ) - // }, [props.columns]) + useDeepCompareEffect(() => { + setColumns( + (props.columns || []).map((item) => ({...item, width: item.width})) as DataCol[], + ) + }, [props.columns]) useEffect(() => { setLoading(true)