Skip to content

Commit

Permalink
Fixes data importer showing incorrect unmatched fields (# 6138) (#6311)
Browse files Browse the repository at this point in the history
fixes #6138

---------

Co-authored-by: Thomas Trompette <[email protected]>
  • Loading branch information
Faisal-imtiyaz123 and thomtrp authored Jul 22, 2024
1 parent 41931c5 commit 4f249df
Showing 1 changed file with 4 additions and 2 deletions.
Original file line number Diff line number Diff line change
@@ -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';
Expand All @@ -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`
Expand Down Expand Up @@ -68,7 +69,8 @@ const getAccordionTitle = <T extends string>(
)?.label;

return `Match ${fieldLabel} (${
'matchedOptions' in column && column.matchedOptions.length
'matchedOptions' in column &&
column.matchedOptions.filter((option) => !isDefined(option.value)).length
} Unmatched)`;
};

Expand Down

0 comments on commit 4f249df

Please sign in to comment.