ManagedTable debouncing
Summary: Removes the fix introduced in D9570518 and upgrading to `react-window@1.1.2` which fixes the problem in the library. Also finetuning debounce times. Reviewed By: passy Differential Revision: D9582591 fbshipit-source-id: 92b008d29f96ce0f11f5cfb5d9e92175ae536ee2
This commit is contained in:
committed by
Facebook Github Bot
parent
63c8bd4368
commit
73e5824e35
@@ -273,17 +273,8 @@ class ManagedTable extends React.Component<
|
||||
|
||||
scrollToBottom() {
|
||||
const {current: tableRef} = this.tableRef;
|
||||
const {current: scrollRef} = this.scrollRef;
|
||||
if (!tableRef || !scrollRef) {
|
||||
return;
|
||||
}
|
||||
|
||||
// only call scrollToItem if the list is actually scrollable (height of the
|
||||
// content is bigger than it's container). Otherwise this might cause
|
||||
// problems: https://github.com/bvaughn/react-window/issues/49
|
||||
const isScrollable = tableRef.props.height < scrollRef.offsetHeight;
|
||||
|
||||
if (tableRef && this.props.rows.length > 1 && isScrollable) {
|
||||
if (tableRef && this.props.rows.length > 1) {
|
||||
tableRef.scrollToItem(this.props.rows.length - 1);
|
||||
}
|
||||
}
|
||||
@@ -531,4 +522,4 @@ class ManagedTable extends React.Component<
|
||||
}
|
||||
}
|
||||
|
||||
export default debounceRender(ManagedTable, 150, {maxTime: 200});
|
||||
export default debounceRender(ManagedTable, 150, {maxWait: 250});
|
||||
|
||||
Reference in New Issue
Block a user