material-react-table 1.2.0 → 1.2.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,5 +1,5 @@
1
1
  {
2
- "version": "1.2.0",
2
+ "version": "1.2.1",
3
3
  "license": "MIT",
4
4
  "name": "material-react-table",
5
5
  "description": "A fully featured Material UI V5 implementation of TanStack React Table V8, written from the ground up in TypeScript.",
@@ -93,7 +93,7 @@
93
93
  "@emotion/styled": ">=11",
94
94
  "@mui/icons-material": ">=5",
95
95
  "@mui/material": ">=5",
96
- "react": ">=16.8"
96
+ "react": ">=17.0"
97
97
  },
98
98
  "dependencies": {
99
99
  "@tanstack/match-sorter-utils": "8.1.1",
@@ -10,12 +10,14 @@ interface Props {
10
10
  export const MRT_TableDetailPanel: FC<Props> = ({ row, table }) => {
11
11
  const {
12
12
  getVisibleLeafColumns,
13
+ getState,
13
14
  options: {
14
15
  muiTableBodyRowProps,
15
16
  muiTableDetailPanelProps,
16
17
  renderDetailPanel,
17
18
  },
18
19
  } = table;
20
+ const { isLoading } = getState();
19
21
 
20
22
  const tableRowProps =
21
23
  muiTableBodyRowProps instanceof Function
@@ -44,7 +46,11 @@ export const MRT_TableDetailPanel: FC<Props> = ({ row, table }) => {
44
46
  })}
45
47
  >
46
48
  {renderDetailPanel && (
47
- <Collapse in={row.getIsExpanded()}>
49
+ <Collapse
50
+ in={!isLoading && row.getIsExpanded()}
51
+ mountOnEnter
52
+ unmountOnExit
53
+ >
48
54
  {renderDetailPanel({ row, table })}
49
55
  </Collapse>
50
56
  )}