diff --git a/packages/twenty-front/src/modules/object-record/record-board/record-board-card/components/RecordBoardCard.tsx b/packages/twenty-front/src/modules/object-record/record-board/record-board-card/components/RecordBoardCard.tsx index 9b096cac1f..50142c9dab 100644 --- a/packages/twenty-front/src/modules/object-record/record-board/record-board-card/components/RecordBoardCard.tsx +++ b/packages/twenty-front/src/modules/object-record/record-board/record-board-card/components/RecordBoardCard.tsx @@ -210,6 +210,10 @@ export const RecordBoardCard = () => { return null; } + const visibleFieldDefinitionsFiltered = visibleFieldDefinitions.filter( + (boardField) => !boardField.isLabelIdentifier, + ); + return ( @@ -252,7 +256,7 @@ export const RecordBoardCard = () => { isOpen={!isCardInCompactMode || !isCompactModeActive} initial={false} > - {visibleFieldDefinitions.map((fieldDefinition) => ( + {visibleFieldDefinitionsFiltered.map((fieldDefinition) => ( diff --git a/packages/twenty-front/src/modules/object-record/record-board/types/RecordBoardFieldDefinition.ts b/packages/twenty-front/src/modules/object-record/record-board/types/RecordBoardFieldDefinition.ts index 779c732436..b8d80d8c0e 100644 --- a/packages/twenty-front/src/modules/object-record/record-board/types/RecordBoardFieldDefinition.ts +++ b/packages/twenty-front/src/modules/object-record/record-board/types/RecordBoardFieldDefinition.ts @@ -6,4 +6,5 @@ export type RecordBoardFieldDefinition = viewFieldId?: string; position: number; isVisible?: boolean; + isLabelIdentifier?: boolean; }; diff --git a/packages/twenty-front/src/modules/object-record/record-index/components/RecordIndexContainer.tsx b/packages/twenty-front/src/modules/object-record/record-index/components/RecordIndexContainer.tsx index 3e9f22e040..03c1e33294 100644 --- a/packages/twenty-front/src/modules/object-record/record-index/components/RecordIndexContainer.tsx +++ b/packages/twenty-front/src/modules/object-record/record-index/components/RecordIndexContainer.tsx @@ -93,10 +93,6 @@ export const RecordIndexContainer = ({ setTableColumns(newFieldDefinitions); - const newRecordIndexFieldDefinitions = newFieldDefinitions.filter( - (boardField) => !boardField.isLabelIdentifier, - ); - const existingRecordIndexFieldDefinitions = snapshot .getLoadable(recordIndexFieldDefinitionsState) .getValue(); @@ -104,10 +100,10 @@ export const RecordIndexContainer = ({ if ( !isDeeplyEqual( existingRecordIndexFieldDefinitions, - newRecordIndexFieldDefinitions, + newFieldDefinitions, ) ) { - set(recordIndexFieldDefinitionsState, newRecordIndexFieldDefinitions); + set(recordIndexFieldDefinitionsState, newFieldDefinitions); } }, [columnDefinitions, setTableColumns],