diff --git a/packages/twenty-front/src/modules/spreadsheet-import/steps/components/MatchColumnsStep/components/TemplateColumn.tsx b/packages/twenty-front/src/modules/spreadsheet-import/steps/components/MatchColumnsStep/components/TemplateColumn.tsx index eb65c9266d..6190742aad 100644 --- a/packages/twenty-front/src/modules/spreadsheet-import/steps/components/MatchColumnsStep/components/TemplateColumn.tsx +++ b/packages/twenty-front/src/modules/spreadsheet-import/steps/components/MatchColumnsStep/components/TemplateColumn.tsx @@ -1,10 +1,10 @@ // TODO: We should create our own accordion component import { Accordion, - AccordionButton as ChakraAccordionButton, AccordionIcon, AccordionItem, AccordionPanel, + AccordionButton as ChakraAccordionButton, } from '@chakra-ui/accordion'; import styled from '@emotion/styled'; import { IconChevronDown, IconForbid } from 'twenty-ui'; @@ -15,6 +15,7 @@ import { Fields } from '@/spreadsheet-import/types'; import { Column, Columns, ColumnType } from '../MatchColumnsStep'; +import { isDefined } from '~/utils/isDefined'; import { SubMatchingSelect } from './SubMatchingSelect'; const StyledContainer = styled.div` @@ -68,7 +69,8 @@ const getAccordionTitle = ( )?.label; return `Match ${fieldLabel} (${ - 'matchedOptions' in column && column.matchedOptions.length + 'matchedOptions' in column && + column.matchedOptions.filter((option) => !isDefined(option.value)).length } Unmatched)`; };