From e810ad701630a09c1452518174ce200a2ed3b291 Mon Sep 17 00:00:00 2001
From: bosiraphael <71827178+bosiraphael@users.noreply.github.com>
Date: Fri, 24 Nov 2023 18:24:54 +0100
Subject: [PATCH] Fix wrong visibility icon (#2707)
fix-wrong-visibility-icon
---
.../options/components/BoardOptionsDropdownContent.tsx | 2 ++
.../options/components/TableOptionsDropdownContent.tsx | 2 ++
.../views/components/ViewFieldsVisibilityDropdownSection.tsx | 4 +++-
3 files changed, 7 insertions(+), 1 deletion(-)
diff --git a/front/src/modules/ui/object/record-board/options/components/BoardOptionsDropdownContent.tsx b/front/src/modules/ui/object/record-board/options/components/BoardOptionsDropdownContent.tsx
index af03527ba4..362b821f93 100644
--- a/front/src/modules/ui/object/record-board/options/components/BoardOptionsDropdownContent.tsx
+++ b/front/src/modules/ui/object/record-board/options/components/BoardOptionsDropdownContent.tsx
@@ -224,6 +224,7 @@ export const BoardOptionsDropdownContent = ({
diff --git a/front/src/modules/ui/object/record-table/options/components/TableOptionsDropdownContent.tsx b/front/src/modules/ui/object/record-table/options/components/TableOptionsDropdownContent.tsx
index fdadf2c795..2bed809f7f 100644
--- a/front/src/modules/ui/object/record-table/options/components/TableOptionsDropdownContent.tsx
+++ b/front/src/modules/ui/object/record-table/options/components/TableOptionsDropdownContent.tsx
@@ -137,6 +137,7 @@ export const TableOptionsDropdownContent = ({
diff --git a/front/src/modules/views/components/ViewFieldsVisibilityDropdownSection.tsx b/front/src/modules/views/components/ViewFieldsVisibilityDropdownSection.tsx
index 005f4bd59a..b1c9a439ad 100644
--- a/front/src/modules/views/components/ViewFieldsVisibilityDropdownSection.tsx
+++ b/front/src/modules/views/components/ViewFieldsVisibilityDropdownSection.tsx
@@ -27,6 +27,7 @@ type ViewFieldsVisibilityDropdownSectionProps = {
field: Omit, 'size' | 'position'>,
) => void;
title: string;
+ isVisible: boolean;
isDraggable: boolean;
onDragEnd?: OnDragEndResponder;
};
@@ -35,6 +36,7 @@ export const ViewFieldsVisibilityDropdownSection = ({
fields,
onVisibilityChange,
title,
+ isVisible,
isDraggable,
onDragEnd,
}: ViewFieldsVisibilityDropdownSectionProps) => {
@@ -71,7 +73,7 @@ export const ViewFieldsVisibilityDropdownSection = ({
if (!field.infoTooltipContent) {
return [
{
- Icon: field.isVisible ? IconMinus : IconPlus,
+ Icon: isVisible ? IconMinus : IconPlus,
onClick: () => onVisibilityChange(field),
},
];