VirtualList
Summary: fixing ts-strict errors Reviewed By: passy Differential Revision: D17181140 fbshipit-source-id: 0b67a744c7fa5d3ef3aad9212e52d1397d873d4d
This commit is contained in:
committed by
Facebook Github Bot
parent
4850da6a72
commit
ffd4a29bba
@@ -61,7 +61,7 @@ export default class VirtualList extends Component<
|
|||||||
overscanCount: 10,
|
overscanCount: 10,
|
||||||
};
|
};
|
||||||
|
|
||||||
ref: HTMLElement;
|
ref: HTMLElement | undefined;
|
||||||
|
|
||||||
setRef = (ref: HTMLElement) => {
|
setRef = (ref: HTMLElement) => {
|
||||||
this.ref = ref;
|
this.ref = ref;
|
||||||
@@ -74,7 +74,7 @@ export default class VirtualList extends Component<
|
|||||||
};
|
};
|
||||||
|
|
||||||
handleScroll = () => {
|
handleScroll = () => {
|
||||||
this.setState({offset: this.ref.scrollTop});
|
this.setState({offset: this.ref ? this.ref.scrollTop : 0});
|
||||||
if (this.props.sync === true) {
|
if (this.props.sync === true) {
|
||||||
this.forceUpdate();
|
this.forceUpdate();
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user