• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

CBIIT / crdc-datahub-ui / 18789341118

24 Oct 2025 06:57PM UTC coverage: 78.178% (+15.5%) from 62.703%
18789341118

push

github

web-flow
Merge pull request #888 from CBIIT/3.4.0

3.4.0 Release

4977 of 5488 branches covered (90.69%)

Branch coverage included in aggregate %.

8210 of 9264 new or added lines in 257 files covered. (88.62%)

6307 existing lines in 120 files now uncovered.

30203 of 39512 relevant lines covered (76.44%)

213.36 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

26.09
/src/components/Questionnaire/TransitionGroupWrapper.tsx
1
import { Collapse, Grid, styled } from "@mui/material";
1✔
2
import { TransitionGroup } from "react-transition-group";
1✔
3

4
const StyledGridWrapper = styled(Grid)(() => ({
1✔
UNCOV
5
  marginBottom: "24px",
×
6
}));
1✔
7

8
type WithKey = { key: string };
9

10
type Props<T extends WithKey> = {
11
  items: T[];
12
  renderItem: (item: T, index: number) => React.ReactNode;
13
};
14

15
/**
16
 * Creates a TransitionGroup and adds a Collapse transition
17
 * when an item is added or removed.
18
 *
19
 * NOTE:
20
 * - This component was created to be directly used within
21
 *   the SectionGroup component.
22
 *
23
 * @param {Props} props
24
 * @returns {JSX.Element}
25
 */
26
const TransitionGroupWrapper = <T extends WithKey>({ items, renderItem }: Props<T>) => {
1✔
27
  if (!items?.length) {
×
28
    return null;
×
UNCOV
29
  }
×
30

31
  return (
×
UNCOV
32
    <StyledGridWrapper item xs={12}>
×
UNCOV
33
      <Grid container rowSpacing={1.5} columnSpacing={0}>
×
UNCOV
34
        <TransitionGroup component={null} style={{ width: "100%" }}>
×
UNCOV
35
          {items?.map((item: T, idx: number) => (
×
36
            <Grid key={item.key} item xs={12} component={Collapse}>
×
UNCOV
37
              {renderItem(item, idx)}
×
UNCOV
38
            </Grid>
×
UNCOV
39
          ))}
×
UNCOV
40
        </TransitionGroup>
×
UNCOV
41
      </Grid>
×
UNCOV
42
    </StyledGridWrapper>
×
43
  );
UNCOV
44
};
×
45

46
export default TransitionGroupWrapper;
1✔
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc