跳至內容
選單
此問題已被標幟
2 回覆
11424 瀏覽次數

Hi,

I want to override the following js function in search bar(addons/web/static/src/js/control_panel/search_bar.js)


_selectSource(source) {
// Inactive sources are:
// - Selection sources
// - "no result" items
if (source.active) {
const labelValue = source.label || this.state.inputValue;
this.model.dispatch('addAutoCompletionValues', {
filterId: source.filterId,
value: "value" in source ? source.value : this._parseWithSource(labelValue, source),
label: labelValue,
operator: source.filterOperator || source.operator,
});
}
this._closeAutoComplete();
}

頭像
捨棄
最佳答案

You need to patching existing class. Look here: https://www.odoo.com/forum/help-1/how-to-patch-a-owl-class-in-past-we-use-include-to-patch-widget-178947

頭像
捨棄
相關帖文 回覆 瀏覽次數 活動
0
10月 22
571
0
12月 20
3762
1
1月 25
2636
1
11月 24
2077
0
3月 21
4459