linear-react-components-ui 0.4.75-beta.3 → 0.4.75-beta.4
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/lib/treeview/index.js +9 -0
- package/package.json +1 -1
package/lib/treeview/index.js
CHANGED
|
@@ -483,6 +483,15 @@ var TreeView = /*#__PURE__*/function (_Component) {
|
|
|
483
483
|
className: "treeviewcontainer ".concat(bordered && '-bordered')
|
|
484
484
|
}, this.buildTree(data))));
|
|
485
485
|
}
|
|
486
|
+
}], [{
|
|
487
|
+
key: "getDerivedStateFromProps",
|
|
488
|
+
value: function getDerivedStateFromProps(props, state) {
|
|
489
|
+
var data = props.data;
|
|
490
|
+
if (data !== state.data) return {
|
|
491
|
+
data: data
|
|
492
|
+
};
|
|
493
|
+
return null;
|
|
494
|
+
}
|
|
486
495
|
}]);
|
|
487
496
|
|
|
488
497
|
return TreeView;
|