Skip to content

Commit

Permalink
Use isDefined
Browse files Browse the repository at this point in the history
  • Loading branch information
thomtrp committed Jul 22, 2024
1 parent d6a665f commit 5e721f4
Showing 1 changed file with 3 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 @@ -69,7 +70,7 @@ const getAccordionTitle = <T extends string>(

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

Expand Down

0 comments on commit 5e721f4

Please sign in to comment.