mirror of
https://github.com/vector-im/element-web.git
synced 2024-11-16 13:14:58 +08:00
don't hide empty sections that have a (+) button
This commit is contained in:
parent
07799f609f
commit
f14c2cf2b2
@ -526,8 +526,9 @@ module.exports = React.createClass({
|
|||||||
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);
|
const len = props.list.length + (props.extraTiles ? props.extraTiles.length : 0);
|
||||||
if (!len) {
|
// empty and no add button? dont render
|
||||||
return components; //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