mirror of
https://github.com/vector-im/element-web.git
synced 2024-11-15 20:54:59 +08:00
filter room directory case insensitively
This commit is contained in:
parent
95a3354b90
commit
f3df0d07f8
@ -69,7 +69,7 @@ module.exports = React.createClass({
|
||||
var rooms = this.state.publicRooms.filter(function(a) {
|
||||
// FIXME: if incrementally typing, keep narrowing down the search set
|
||||
// incrementally rather than starting over each time.
|
||||
return (a.aliases[0].search(filter) >= 0 && a.num_joined_members > 0);
|
||||
return (a.aliases[0].toLowerCase().search(filter.toLowerCase()) >= 0 && a.num_joined_members > 0);
|
||||
}).sort(function(a,b) {
|
||||
return a.num_joined_members - b.num_joined_members;
|
||||
});
|
||||
|
Loading…
Reference in New Issue
Block a user