mirror of
https://github.com/vector-im/element-web.git
synced 2024-11-16 13:14:58 +08:00
make sure no resize handle is put after last sublist
This commit is contained in:
parent
7c64d9637e
commit
ebd3d34106
@ -449,14 +449,15 @@ module.exports = React.createClass({
|
|||||||
searchFilter: this.props.searchFilter,
|
searchFilter: this.props.searchFilter,
|
||||||
incomingCall: this.state.incomingCall,
|
incomingCall: this.state.incomingCall,
|
||||||
};
|
};
|
||||||
|
|
||||||
|
subListsProps = subListsProps.filter((props => {
|
||||||
|
const len = props.list.length + (props.extraTiles ? props.extraTiles.length : 0);
|
||||||
|
return len !== 0 || props.onAddRoom;
|
||||||
|
}));
|
||||||
|
|
||||||
return subListsProps.reduce((components, props, i) => {
|
return subListsProps.reduce((components, props, i) => {
|
||||||
props = Object.assign({}, defaultProps, props);
|
props = Object.assign({}, defaultProps, props);
|
||||||
const isLast = i === subListsProps.length - 1;
|
const isLast = i === subListsProps.length - 1;
|
||||||
const len = props.list.length + (props.extraTiles ? props.extraTiles.length : 0);
|
|
||||||
// empty and no add button? dont render
|
|
||||||
if (!len && !props.onAddRoom) {
|
|
||||||
return components;
|
|
||||||
}
|
|
||||||
const {key, label, ... otherProps} = props;
|
const {key, label, ... otherProps} = props;
|
||||||
const chosenKey = key || label;
|
const chosenKey = key || label;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user