|
|
@ -215,7 +215,8 @@ export class Searcher extends Widget { |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
_search() { |
|
|
|
_search() { |
|
|
|
const { isAutoSearch, adapter, isAutoSync, onSearch } = this.options; |
|
|
|
const { isAutoSearch, isAutoSync, onSearch } = this.options; |
|
|
|
|
|
|
|
const adapter = isFunction(this.options.adapter) ? this.options.adapter() : this.options.adapter; |
|
|
|
const keyword = this.editor.getValue(); |
|
|
|
const keyword = this.editor.getValue(); |
|
|
|
if (keyword === "" || this._stop) { |
|
|
|
if (keyword === "" || this._stop) { |
|
|
|
return; |
|
|
|
return; |
|
|
@ -335,7 +336,8 @@ export class Searcher extends Widget { |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
getValue() { |
|
|
|
getValue() { |
|
|
|
const { isAutoSync, adapter, popup } = this.options; |
|
|
|
const { isAutoSync, popup } = this.options; |
|
|
|
|
|
|
|
const adapter = isFunction(this.options.adapter) ? this.options.adapter() : this.options.adapter; |
|
|
|
if (isAutoSync && adapter && adapter.getValue) { |
|
|
|
if (isAutoSync && adapter && adapter.getValue) { |
|
|
|
return adapter.getValue(); |
|
|
|
return adapter.getValue(); |
|
|
|
} |
|
|
|
} |
|
|
@ -352,7 +354,8 @@ export class Searcher extends Widget { |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
populate(result, searchResult, keyword) { |
|
|
|
populate(result, searchResult, keyword) { |
|
|
|
const { isAutoSync, adapter } = this.options; |
|
|
|
const { isAutoSync } = this.options; |
|
|
|
|
|
|
|
const adapter = isFunction(this.options.adapter) ? this.options.adapter() : this.options.adapter; |
|
|
|
this._assertPopupView(); |
|
|
|
this._assertPopupView(); |
|
|
|
this.popupView.populate(...arguments); |
|
|
|
this.popupView.populate(...arguments); |
|
|
|
if (isAutoSync && adapter && adapter.getValue) { |
|
|
|
if (isAutoSync && adapter && adapter.getValue) { |
|
|
|