We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 2e52428 + 193a0d1 commit 0d2af34Copy full SHA for 0d2af34
src/components/SplitPane.jsx
@@ -11,17 +11,14 @@ export class SplitPane extends Component {
11
componentDidMount() {
12
this.updateSplit();
13
}
14
- componentDidUpdate(prevProps) {
15
- if (prevProps.direction !== this.props.direction) {
16
- if (this.splitInstance) {
17
- try {
18
- this.splitInstance.destroy();
19
- } catch (e) {
+ componentWillUpdate() {
+ if (this.splitInstance) {
+ try {
+ this.splitInstance.destroy();
+ } catch (e) {
20
// Ignore errors during destruction (e.g. if nodes are already removed)
21
// This happens often with VDOM re-renders conflicting with Split.js DOM manipulation
22
- }
23
24
- this.updateSplit();
25
26
27
componentWillUnmount() {
0 commit comments