mirror of
https://github.com/TryGhost/Ghost.git
synced 2024-12-25 11:55:03 +03:00
Fix selected search item appearing as multi-select item in search input
no issue - adds an observer to the component's `selection` property that always clears it if it's assigned a value
This commit is contained in:
parent
16d7790a19
commit
290988eb33
@ -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 () {
|
||||
key.setScope('search-input');
|
||||
},
|
||||
@ -105,7 +111,6 @@ export default Ember.Component.extend({
|
||||
transition = self.get('_routing.router').transitionTo('team.user', selected.id);
|
||||
}
|
||||
|
||||
self.set('selection', '');
|
||||
transition.then(function () {
|
||||
if (self.get('_selectize').$control_input.is(':focus')) {
|
||||
self._setKeymasterScope();
|
||||
|
Loading…
Reference in New Issue
Block a user