[FIX] web: get right result for arrow suggestions
In the search input, the result of filtered search with an arrow was placed under the currently selected arrow. Hence if we get to another arrow filter before the result is received, the result is added under the wrong arrow. This fix adds the result under the right arrow. closes #6442 opw-632519
This commit is contained in:
parent
e66efbd9f6
commit
a1bfa84f65
|
@ -2502,14 +2502,15 @@ instance.web.search.AutoComplete = instance.web.Widget.extend({
|
||||||
},
|
},
|
||||||
expand: function () {
|
expand: function () {
|
||||||
var self = this;
|
var self = this;
|
||||||
this.current_result.expand(this.get_search_string()).then(function (results) {
|
var current_result = this.current_result;
|
||||||
|
current_result.expand(this.get_search_string()).then(function (results) {
|
||||||
(results || [{label: '(no result)'}]).reverse().forEach(function (result) {
|
(results || [{label: '(no result)'}]).reverse().forEach(function (result) {
|
||||||
result.indent = true;
|
result.indent = true;
|
||||||
var $li = self.make_list_item(result);
|
var $li = self.make_list_item(result);
|
||||||
self.current_result.$el.after($li);
|
current_result.$el.after($li);
|
||||||
});
|
});
|
||||||
self.current_result.expanded = true;
|
current_result.expanded = true;
|
||||||
self.current_result.$el.find('span.oe-expand').html('▼');
|
current_result.$el.find('span.oe-expand').html('▼');
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
fold: function () {
|
fold: function () {
|
||||||
|
|
Loading…
Reference in New Issue