Skip to content

Commit

Permalink
Merge pull request #2380 from vector-im/dbkr/roomdir_no_results
Browse files Browse the repository at this point in the history
Room directory: indicate when there are no results
  • Loading branch information
richvdh authored Sep 30, 2016
2 parents 5b3524f + 2a37a0c commit 8e0be29
Showing 1 changed file with 19 additions and 14 deletions.
33 changes: 19 additions & 14 deletions src/components/structures/RoomDirectory.js
Original file line number Diff line number Diff line change
Expand Up @@ -414,20 +414,25 @@ module.exports = React.createClass({
<Loader />
</div>;
} else {
const ScrollPanel = sdk.getComponent("structures.ScrollPanel");
content = <ScrollPanel ref={this.collectScrollPanel}
className="mx_RoomDirectory_tableWrapper"
onFillRequest={ this.onFillRequest }
stickyBottom={false}
startAtBottom={false}
onResize={function(){}}
>
<table ref="directory_table" className="mx_RoomDirectory_table">
<tbody>
{ this.getRows() }
</tbody>
</table>
</ScrollPanel>;
const rows = this.getRows();
if (rows.length == 0) {
content = <i>No rooms to show</i>;
} else {
const ScrollPanel = sdk.getComponent("structures.ScrollPanel");
content = <ScrollPanel ref={this.collectScrollPanel}
className="mx_RoomDirectory_tableWrapper"
onFillRequest={ this.onFillRequest }
stickyBottom={false}
startAtBottom={false}
onResize={function(){}}
>
<table ref="directory_table" className="mx_RoomDirectory_table">
<tbody>
{ this.getRows() }
</tbody>
</table>
</ScrollPanel>;
}
}

const SimpleRoomHeader = sdk.getComponent('rooms.SimpleRoomHeader');
Expand Down

0 comments on commit 8e0be29

Please sign in to comment.