We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent dff7515 commit 77910dbCopy full SHA for 77910db
packages/table/src/Table.js
@@ -17,7 +17,7 @@ class Table extends React.Component {
17
expandedRows: []
18
};
19
20
- componentDidMount() {
+ updateRowsMap() {
21
const { rowGroupKey } = this.props;
22
const hasSubRows = row =>
23
rowGroupKey && row[rowGroupKey] && row[rowGroupKey].length;
@@ -40,6 +40,16 @@ class Table extends React.Component {
40
this.setState({ rowsMap });
41
}
42
43
+ componentDidMount() {
44
+ this.updateRowsMap();
45
+ }
46
+
47
+ componentDidUpdate(oldProps) {
48
+ if (oldProps.data.length !== this.props.data.length) {
49
50
51
52
53
render() {
54
const {
55
data,
0 commit comments