Merge pull request #2380 from vector-im/dbkr/roomdir_no_results
Room directory: indicate when there are no results
This commit is contained in:
commit
8e0be29c13
1 changed files with 19 additions and 14 deletions
|
@ -414,20 +414,25 @@ module.exports = React.createClass({
|
||||||
<Loader />
|
<Loader />
|
||||||
</div>;
|
</div>;
|
||||||
} else {
|
} else {
|
||||||
const ScrollPanel = sdk.getComponent("structures.ScrollPanel");
|
const rows = this.getRows();
|
||||||
content = <ScrollPanel ref={this.collectScrollPanel}
|
if (rows.length == 0) {
|
||||||
className="mx_RoomDirectory_tableWrapper"
|
content = <i>No rooms to show</i>;
|
||||||
onFillRequest={ this.onFillRequest }
|
} else {
|
||||||
stickyBottom={false}
|
const ScrollPanel = sdk.getComponent("structures.ScrollPanel");
|
||||||
startAtBottom={false}
|
content = <ScrollPanel ref={this.collectScrollPanel}
|
||||||
onResize={function(){}}
|
className="mx_RoomDirectory_tableWrapper"
|
||||||
>
|
onFillRequest={ this.onFillRequest }
|
||||||
<table ref="directory_table" className="mx_RoomDirectory_table">
|
stickyBottom={false}
|
||||||
<tbody>
|
startAtBottom={false}
|
||||||
{ this.getRows() }
|
onResize={function(){}}
|
||||||
</tbody>
|
>
|
||||||
</table>
|
<table ref="directory_table" className="mx_RoomDirectory_table">
|
||||||
</ScrollPanel>;
|
<tbody>
|
||||||
|
{ this.getRows() }
|
||||||
|
</tbody>
|
||||||
|
</table>
|
||||||
|
</ScrollPanel>;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
const SimpleRoomHeader = sdk.getComponent('rooms.SimpleRoomHeader');
|
const SimpleRoomHeader = sdk.getComponent('rooms.SimpleRoomHeader');
|
||||||
|
|
Loading…
Reference in a new issue