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() {
|
scrollToBottom() {
|
||||||
const {current: tableRef} = this.tableRef;
|
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
|
if (tableRef && this.props.rows.length > 1) {
|
||||||
// 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) {
|
|
||||||
tableRef.scrollToItem(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});
|
||||||
|
|||||||
@@ -3476,6 +3476,7 @@ mem@^1.1.0:
|
|||||||
memoize-one@^3.1.1:
|
memoize-one@^3.1.1:
|
||||||
version "3.1.1"
|
version "3.1.1"
|
||||||
resolved "https://registry.yarnpkg.com/memoize-one/-/memoize-one-3.1.1.tgz#ef609811e3bc28970eac2884eece64d167830d17"
|
resolved "https://registry.yarnpkg.com/memoize-one/-/memoize-one-3.1.1.tgz#ef609811e3bc28970eac2884eece64d167830d17"
|
||||||
|
integrity sha512-YqVh744GsMlZu6xkhGslPSqSurOv6P+kLN2J3ysBZfagLcL5FdRK/0UpgLoL8hwjjEvvAVkjJZyFP+1T6p1vgA==
|
||||||
|
|
||||||
meow@^3.1.0:
|
meow@^3.1.0:
|
||||||
version "3.7.0"
|
version "3.7.0"
|
||||||
@@ -4258,8 +4259,9 @@ react-virtualized-auto-sizer@^1.0.2:
|
|||||||
resolved "https://registry.yarnpkg.com/react-virtualized-auto-sizer/-/react-virtualized-auto-sizer-1.0.2.tgz#a61dd4f756458bbf63bd895a92379f9b70f803bd"
|
resolved "https://registry.yarnpkg.com/react-virtualized-auto-sizer/-/react-virtualized-auto-sizer-1.0.2.tgz#a61dd4f756458bbf63bd895a92379f9b70f803bd"
|
||||||
|
|
||||||
react-window@^1.1.1:
|
react-window@^1.1.1:
|
||||||
version "1.1.1"
|
version "1.1.2"
|
||||||
resolved "https://registry.yarnpkg.com/react-window/-/react-window-1.1.1.tgz#8a0cf488c9db19425fb804f118f5aac6227d7fd2"
|
resolved "https://registry.yarnpkg.com/react-window/-/react-window-1.1.2.tgz#1909e5e9bc0158531c18044b1f06ad91b11291e8"
|
||||||
|
integrity sha512-7cHSreVnLHds09devYhtt7sTVKX7IEibXo8Mn9JRbOAFNCqj10HfuIzNCP2P+NVX8+DnXr/tp9AbdTaTZ7wcbA==
|
||||||
dependencies:
|
dependencies:
|
||||||
memoize-one "^3.1.1"
|
memoize-one "^3.1.1"
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user