From 04ac78ba1513277c61067b4a79057de7a74bf514 Mon Sep 17 00:00:00 2001 From: Tolulope Adetula <31691737+Tooluloope@users.noreply.github.com> Date: Wed, 20 Apr 2022 14:56:01 +0100 Subject: [PATCH 1/2] fix: Primary column control visibility icon out of sync --- app/client/src/components/ads/DraggableListCard.tsx | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/app/client/src/components/ads/DraggableListCard.tsx b/app/client/src/components/ads/DraggableListCard.tsx index 0645c8c95d..01fc9fe4da 100644 --- a/app/client/src/components/ads/DraggableListCard.tsx +++ b/app/client/src/components/ads/DraggableListCard.tsx @@ -61,6 +61,10 @@ export function DraggableListCard(props: RenderComponentProps) { const ref = useRef(null); const debouncedUpdate = _.debounce(updateOption, 1000); + useEffect(() => { + setVisibility(item.isVisible); + }, [item.isVisible]); + useEffect(() => { if (!isEditing && item && item.label) setValue(item.label); }, [item?.label, isEditing]);