File tree Expand file tree Collapse file tree 2 files changed +8
-1
lines changed Expand file tree Collapse file tree 2 files changed +8
-1
lines changed Original file line number Diff line number Diff line change 5757 " > 1%"
5858 ],
5959 "dependencies" : {
60+ "lodash.debounce" : " ^4.0.8" ,
6061 "lodash.isequal" : " ^4.4.0" ,
6162 "prop-types" : " ^15.6.1" ,
6263 "react-dnd" : " 2.5.4" ,
Original file line number Diff line number Diff line change 11import React , { Component } from 'react' ;
22import PropTypes from 'prop-types' ;
33import { AutoSizer , List } from 'react-virtualized' ;
4- import isEqual from 'lodash.isequal' ;
4+ import isEqual from 'lodash.isequal' ;
5+ import debounce from 'lodash.debounce' ;
56import withScrolling , {
67 createVerticalStrength ,
78 createHorizontalStrength ,
@@ -117,6 +118,9 @@ class ReactSortableTree extends Component {
117118 this . endDrag = this . endDrag . bind ( this ) ;
118119 this . drop = this . drop . bind ( this ) ;
119120 this . handleDndMonitorChange = this . handleDndMonitorChange . bind ( this ) ;
121+ this . recomputeRowHeightsDebounced = debounce ( ( ) => {
122+ this . scrollZoneVirtualListComponent . wrappedInstance . recomputeRowHeights ( ) ;
123+ } , 300 ) ;
120124 }
121125
122126 componentDidMount ( ) {
@@ -390,6 +394,8 @@ class ReactSortableTree extends Component {
390394 searchFocusTreeIndex : null ,
391395 dragging : true ,
392396 } ) ;
397+
398+ this . recomputeRowHeightsDebounced ( ) ;
393399 }
394400
395401 endDrag ( dropResult ) {
You can’t perform that action at this time.
0 commit comments