diff --git a/lib/components/steps/mapping/MappingStep.tsx b/lib/components/steps/mapping/MappingStep.tsx index 32a69f0..86e1c87 100644 --- a/lib/components/steps/mapping/MappingStep.tsx +++ b/lib/components/steps/mapping/MappingStep.tsx @@ -53,7 +53,7 @@ interface CustomTabPanelProps extends BoxProps { } -const CustomTabPanel: React.FC = ({ children, value, index, ...other }) => { +const CustomTabPanel: React.FC = ({children, value, index, ...other}) => { return ( (prevValue + 1) % tabsArr.length); }; - const renderTabComponent = () => { + const renderTabComponent = React.useMemo(() => { switch (tabIndex) { case TabsEnum.Collection: return ; case TabsEnum.Mapping: - return ; + return ; default: return
Unknown step
; } - }; + }, [defaultCollection, getUnmappedRowsCount, tabIndex]); return ( @@ -139,14 +140,16 @@ function MappingStep() { } > - + ))} {tabIndex === TabsEnum.Suggestions ? ( - ) : tabIndex === TabsEnum.Mapping && (<> - +