mirror of
https://github.com/status-im/realm-js.git
synced 2025-01-11 06:46:03 +00:00
Delegate a couple ListView methods
This commit is contained in:
parent
5772717dee
commit
7f25ed7897
12
react-native/listview.js
vendored
12
react-native/listview.js
vendored
@ -154,7 +154,9 @@ class ListView extends React.Component {
|
|||||||
}
|
}
|
||||||
|
|
||||||
render() {
|
render() {
|
||||||
return <React.ListView {...this.props} renderRow={this.renderRow} />;
|
return (
|
||||||
|
<React.ListView {...this.props} ref="listView" renderRow={this.renderRow} />
|
||||||
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
renderRow(_, sectionId, rowId, ...args) {
|
renderRow(_, sectionId, rowId, ...args) {
|
||||||
@ -164,6 +166,14 @@ class ListView extends React.Component {
|
|||||||
// The item could be null because our data is a snapshot and it was deleted.
|
// The item could be null because our data is a snapshot and it was deleted.
|
||||||
return item ? props.renderRow(item, sectionId, rowId, ...args) : null;
|
return item ? props.renderRow(item, sectionId, rowId, ...args) : null;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
scrollTo(x, y, ...extra) {
|
||||||
|
this.refs.listView.scrollTo(x, y, ...extra);
|
||||||
|
}
|
||||||
|
|
||||||
|
setNativeProps(props) {
|
||||||
|
this.refs.listView.setNativeProps(props);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
ListView.propTypes = {
|
ListView.propTypes = {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user