Skip to content

Commit

Permalink
"Name" column is visible on table view but not on kanban view
Browse files Browse the repository at this point in the history
  • Loading branch information
gitstart-twenty committed Jul 26, 2024
1 parent 0349d02 commit 2957c14
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -210,6 +210,10 @@ export const RecordBoardCard = () => {
return null;
}

const visibleFieldDefinitionsFiltered = visibleFieldDefinitions.filter(
(boardField) => !boardField.isLabelIdentifier,
);

return (
<StyledBoardCardWrapper onContextMenu={handleContextMenu}>
<RecordValueSetterEffect recordId={recordId} />
Expand Down Expand Up @@ -252,7 +256,7 @@ export const RecordBoardCard = () => {
isOpen={!isCardInCompactMode || !isCompactModeActive}
initial={false}
>
{visibleFieldDefinitions.map((fieldDefinition) => (
{visibleFieldDefinitionsFiltered.map((fieldDefinition) => (
<PreventSelectOnClickContainer
key={fieldDefinition.fieldMetadataId}
>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,5 @@ export type RecordBoardFieldDefinition<T extends FieldMetadata> =
viewFieldId?: string;
position: number;
isVisible?: boolean;
isLabelIdentifier?: boolean;
};
Original file line number Diff line number Diff line change
Expand Up @@ -93,21 +93,17 @@ export const RecordIndexContainer = ({

setTableColumns(newFieldDefinitions);

const newRecordIndexFieldDefinitions = newFieldDefinitions.filter(
(boardField) => !boardField.isLabelIdentifier,
);

const existingRecordIndexFieldDefinitions = snapshot
.getLoadable(recordIndexFieldDefinitionsState)
.getValue();

if (
!isDeeplyEqual(
existingRecordIndexFieldDefinitions,
newRecordIndexFieldDefinitions,
newFieldDefinitions,
)
) {
set(recordIndexFieldDefinitionsState, newRecordIndexFieldDefinitions);
set(recordIndexFieldDefinitionsState, newFieldDefinitions);
}
},
[columnDefinitions, setTableColumns],
Expand Down

0 comments on commit 2957c14

Please sign in to comment.