mirror of
https://github.com/twentyhq/twenty.git
synced 2024-12-25 13:02:15 +03:00
parent
135733288d
commit
e810ad7016
@ -224,6 +224,7 @@ export const BoardOptionsDropdownContent = ({
|
|||||||
<ViewFieldsVisibilityDropdownSection
|
<ViewFieldsVisibilityDropdownSection
|
||||||
title="Visible"
|
title="Visible"
|
||||||
fields={visibleBoardCardFields}
|
fields={visibleBoardCardFields}
|
||||||
|
isVisible={true}
|
||||||
onVisibilityChange={handleFieldVisibilityChange}
|
onVisibilityChange={handleFieldVisibilityChange}
|
||||||
isDraggable={true}
|
isDraggable={true}
|
||||||
onDragEnd={handleReorderField}
|
onDragEnd={handleReorderField}
|
||||||
@ -234,6 +235,7 @@ export const BoardOptionsDropdownContent = ({
|
|||||||
<ViewFieldsVisibilityDropdownSection
|
<ViewFieldsVisibilityDropdownSection
|
||||||
title="Hidden"
|
title="Hidden"
|
||||||
fields={hiddenBoardCardFields}
|
fields={hiddenBoardCardFields}
|
||||||
|
isVisible={false}
|
||||||
onVisibilityChange={handleFieldVisibilityChange}
|
onVisibilityChange={handleFieldVisibilityChange}
|
||||||
isDraggable={false}
|
isDraggable={false}
|
||||||
/>
|
/>
|
||||||
|
@ -137,6 +137,7 @@ export const TableOptionsDropdownContent = ({
|
|||||||
<ViewFieldsVisibilityDropdownSection
|
<ViewFieldsVisibilityDropdownSection
|
||||||
title="Visible"
|
title="Visible"
|
||||||
fields={visibleTableColumns}
|
fields={visibleTableColumns}
|
||||||
|
isVisible={true}
|
||||||
onVisibilityChange={handleColumnVisibilityChange}
|
onVisibilityChange={handleColumnVisibilityChange}
|
||||||
isDraggable={true}
|
isDraggable={true}
|
||||||
onDragEnd={handleReorderField}
|
onDragEnd={handleReorderField}
|
||||||
@ -147,6 +148,7 @@ export const TableOptionsDropdownContent = ({
|
|||||||
<ViewFieldsVisibilityDropdownSection
|
<ViewFieldsVisibilityDropdownSection
|
||||||
title="Hidden"
|
title="Hidden"
|
||||||
fields={hiddenTableColumns}
|
fields={hiddenTableColumns}
|
||||||
|
isVisible={false}
|
||||||
onVisibilityChange={handleColumnVisibilityChange}
|
onVisibilityChange={handleColumnVisibilityChange}
|
||||||
isDraggable={false}
|
isDraggable={false}
|
||||||
/>
|
/>
|
||||||
|
@ -27,6 +27,7 @@ type ViewFieldsVisibilityDropdownSectionProps = {
|
|||||||
field: Omit<ColumnDefinition<FieldMetadata>, 'size' | 'position'>,
|
field: Omit<ColumnDefinition<FieldMetadata>, 'size' | 'position'>,
|
||||||
) => void;
|
) => void;
|
||||||
title: string;
|
title: string;
|
||||||
|
isVisible: boolean;
|
||||||
isDraggable: boolean;
|
isDraggable: boolean;
|
||||||
onDragEnd?: OnDragEndResponder;
|
onDragEnd?: OnDragEndResponder;
|
||||||
};
|
};
|
||||||
@ -35,6 +36,7 @@ export const ViewFieldsVisibilityDropdownSection = ({
|
|||||||
fields,
|
fields,
|
||||||
onVisibilityChange,
|
onVisibilityChange,
|
||||||
title,
|
title,
|
||||||
|
isVisible,
|
||||||
isDraggable,
|
isDraggable,
|
||||||
onDragEnd,
|
onDragEnd,
|
||||||
}: ViewFieldsVisibilityDropdownSectionProps) => {
|
}: ViewFieldsVisibilityDropdownSectionProps) => {
|
||||||
@ -71,7 +73,7 @@ export const ViewFieldsVisibilityDropdownSection = ({
|
|||||||
if (!field.infoTooltipContent) {
|
if (!field.infoTooltipContent) {
|
||||||
return [
|
return [
|
||||||
{
|
{
|
||||||
Icon: field.isVisible ? IconMinus : IconPlus,
|
Icon: isVisible ? IconMinus : IconPlus,
|
||||||
onClick: () => onVisibilityChange(field),
|
onClick: () => onVisibilityChange(field),
|
||||||
},
|
},
|
||||||
];
|
];
|
||||||
|
Loading…
Reference in New Issue
Block a user