mirror of
https://github.com/vector-im/element-web.git
synced 2024-11-16 13:14:58 +08:00
use start, end rather than min, max
This commit is contained in:
parent
f1a2b6d327
commit
dba48e2f8f
@ -53,16 +53,16 @@ module.exports = React.createClass({
|
|||||||
};
|
};
|
||||||
},
|
},
|
||||||
|
|
||||||
_getChildren: function(min, max) {
|
_getChildren: function(start, end) {
|
||||||
if (this.props.getChildren && this.props.getChildCount) {
|
if (this.props.getChildren && this.props.getChildCount) {
|
||||||
return this.props.getChildren(min, max);
|
return this.props.getChildren(start, end);
|
||||||
} else {
|
} else {
|
||||||
// XXX: I'm not sure why anything would pass null into this, it seems
|
// XXX: I'm not sure why anything would pass null into this, it seems
|
||||||
// like a bizzare case to handle, but I'm preserving the behaviour.
|
// like a bizzare case to handle, but I'm preserving the behaviour.
|
||||||
// (see commit 38d5c7d5c5d5a34dc16ef5d46278315f5c57f542)
|
// (see commit 38d5c7d5c5d5a34dc16ef5d46278315f5c57f542)
|
||||||
return React.Children.toArray(this.props.children).filter((c) => {
|
return React.Children.toArray(this.props.children).filter((c) => {
|
||||||
return c != null;
|
return c != null;
|
||||||
}).slice(min, max);
|
}).slice(start, end);
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
|
@ -356,8 +356,8 @@ module.exports = React.createClass({
|
|||||||
return memberList;
|
return memberList;
|
||||||
},
|
},
|
||||||
|
|
||||||
_getChildrenJoined: function(min, max) {
|
_getChildrenJoined: function(start, end) {
|
||||||
return this._makeMemberTiles(this.state.filteredJoinedMembers.slice(min, max));
|
return this._makeMemberTiles(this.state.filteredJoinedMembers.slice(start, end));
|
||||||
},
|
},
|
||||||
|
|
||||||
_getChildCountJoined: function() {
|
_getChildCountJoined: function() {
|
||||||
|
Loading…
Reference in New Issue
Block a user