Skip to content

Commit 965be5e

Browse files
Adds visibleItems
1 parent 1137e9e commit 965be5e

File tree

2 files changed

+8
-0
lines changed

2 files changed

+8
-0
lines changed

dist/VirtualList.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -98,6 +98,10 @@ var VirtualList = React.createClass({displayName: "VirtualList",
9898

9999
this.setState(state);
100100
},
101+
// in case you need to get the currently visible items
102+
visibleItems: function() {
103+
return this.state.items;
104+
},
101105
render: function() {
102106
return (
103107
React.createElement(this.props.tagName, React.__spread({}, this.props, {style: {boxSizing: 'border-box', height: this.state.height, paddingTop: this.state.bufferStart}}),

src/VirtualList.jsx

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -98,6 +98,10 @@ var VirtualList = React.createClass({
9898

9999
this.setState(state);
100100
},
101+
// in case you need to get the currently visible items
102+
visibleItems: function() {
103+
return this.state.items;
104+
},
101105
render: function() {
102106
return (
103107
<this.props.tagName {...this.props} style={{boxSizing: 'border-box', height: this.state.height, paddingTop: this.state.bufferStart }} >

0 commit comments

Comments
 (0)