From 2a37a0cb1948e000bb3e675c9fb9941af3817a37 Mon Sep 17 00:00:00 2001 From: David Baker Date: Thu, 29 Sep 2016 15:45:45 +0100 Subject: [PATCH] Room directory: indicate when there are no results Fixes https://github.com/vector-im/vector-web/issues/2250 --- src/components/structures/RoomDirectory.js | 33 +++++++++++++--------- 1 file changed, 19 insertions(+), 14 deletions(-) diff --git a/src/components/structures/RoomDirectory.js b/src/components/structures/RoomDirectory.js index 0111ee3108..a42e76b434 100644 --- a/src/components/structures/RoomDirectory.js +++ b/src/components/structures/RoomDirectory.js @@ -414,20 +414,25 @@ module.exports = React.createClass({ ; } else { - const ScrollPanel = sdk.getComponent("structures.ScrollPanel"); - content = - - - { this.getRows() } - -
-
; + const rows = this.getRows(); + if (rows.length == 0) { + content = No rooms to show; + } else { + const ScrollPanel = sdk.getComponent("structures.ScrollPanel"); + content = + + + { this.getRows() } + +
+
; + } } const SimpleRoomHeader = sdk.getComponent('rooms.SimpleRoomHeader');