mirror of
https://github.com/TryGhost/Ghost.git
synced 2025-02-24 23:48:13 -05:00
Merge pull request #5792 from kevinansfield/fix-search-listing-selection
Fix selected search item appearing as multi-select item in search input
This commit is contained in:
commit
82edba3ff3
1 changed files with 6 additions and 1 deletions
|
@ -78,6 +78,12 @@ export default Ember.Component.extend({
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
|
||||||
|
_keepSelectionClear: Ember.observer('selection', function () {
|
||||||
|
if (this.get('selection') !== null) {
|
||||||
|
this.set('selection', null);
|
||||||
|
}
|
||||||
|
}),
|
||||||
|
|
||||||
_setKeymasterScope: function () {
|
_setKeymasterScope: function () {
|
||||||
key.setScope('search-input');
|
key.setScope('search-input');
|
||||||
},
|
},
|
||||||
|
@ -105,7 +111,6 @@ export default Ember.Component.extend({
|
||||||
transition = self.get('_routing.router').transitionTo('team.user', selected.id);
|
transition = self.get('_routing.router').transitionTo('team.user', selected.id);
|
||||||
}
|
}
|
||||||
|
|
||||||
self.set('selection', '');
|
|
||||||
transition.then(function () {
|
transition.then(function () {
|
||||||
if (self.get('_selectize').$control_input.is(':focus')) {
|
if (self.get('_selectize').$control_input.is(':focus')) {
|
||||||
self._setKeymasterScope();
|
self._setKeymasterScope();
|
||||||
|
|
Loading…
Add table
Reference in a new issue