File tree 2 files changed +8
-1
lines changed
2 files changed +8
-1
lines changed Original file line number Diff line number Diff line change 57
57
" > 1%"
58
58
],
59
59
"dependencies" : {
60
+ "lodash.debounce" : " ^4.0.8" ,
60
61
"lodash.isequal" : " ^4.4.0" ,
61
62
"prop-types" : " ^15.6.1" ,
62
63
"react-dnd" : " 2.5.4" ,
Original file line number Diff line number Diff line change 1
1
import React , { Component } from 'react' ;
2
2
import PropTypes from 'prop-types' ;
3
3
import { AutoSizer , List } from 'react-virtualized' ;
4
- import isEqual from 'lodash.isequal' ;
4
+ import isEqual from 'lodash.isequal' ;
5
+ import debounce from 'lodash.debounce' ;
5
6
import withScrolling , {
6
7
createVerticalStrength ,
7
8
createHorizontalStrength ,
@@ -117,6 +118,9 @@ class ReactSortableTree extends Component {
117
118
this . endDrag = this . endDrag . bind ( this ) ;
118
119
this . drop = this . drop . bind ( this ) ;
119
120
this . handleDndMonitorChange = this . handleDndMonitorChange . bind ( this ) ;
121
+ this . recomputeRowHeightsDebounced = debounce ( ( ) => {
122
+ this . scrollZoneVirtualListComponent . wrappedInstance . recomputeRowHeights ( ) ;
123
+ } , 300 ) ;
120
124
}
121
125
122
126
componentDidMount ( ) {
@@ -390,6 +394,8 @@ class ReactSortableTree extends Component {
390
394
searchFocusTreeIndex : null ,
391
395
dragging : true ,
392
396
} ) ;
397
+
398
+ this . recomputeRowHeightsDebounced ( ) ;
393
399
}
394
400
395
401
endDrag ( dropResult ) {
You can’t perform that action at this time.
0 commit comments