Implement the focus_room_filter action
This is for ctrl+k room filtering and switching
This commit is contained in:
parent
898725082a
commit
4fe4e10abb
|
@ -46,18 +46,22 @@ module.exports = React.createClass({
|
||||||
},
|
},
|
||||||
|
|
||||||
onAction: function(payload) {
|
onAction: function(payload) {
|
||||||
// Disabling this as I find it really really annoying, and was used to the
|
|
||||||
// previous behaviour - see https://github.com/vector-im/riot-web/issues/3348
|
|
||||||
/*
|
|
||||||
switch (payload.action) {
|
switch (payload.action) {
|
||||||
|
/* Disabling this as I find it really really annoying, and was used to the
|
||||||
|
previous behaviour - see https://github.com/vector-im/riot-web/issues/3348
|
||||||
// Clear up the text field when a room is selected.
|
// Clear up the text field when a room is selected.
|
||||||
case 'view_room':
|
case 'view_room':
|
||||||
if (this.refs.search) {
|
if (this.refs.search) {
|
||||||
this._clearSearch();
|
this._clearSearch();
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
}
|
|
||||||
*/
|
*/
|
||||||
|
case 'focus_room_filter':
|
||||||
|
if (this.refs.search) {
|
||||||
|
this.refs.search.focus();
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
onChange: function() {
|
onChange: function() {
|
||||||
|
|
Loading…
Reference in New Issue