Browse Source

feat: 增加getSearcher接口

es6
iapyang 4 years ago
parent
commit
45de9206ec
  1. 9
      src/widget/multilayersingletree/multilayersingletree.combo.js
  2. 5
      typescript/widget/multilayersingletree/multilayersingletree.combo.ts

9
src/widget/multilayersingletree/multilayersingletree.combo.js

@ -202,11 +202,14 @@ BI.MultiLayerSingleTreeCombo = BI.inherit(BI.Widget, {
},
_getSyncConfig: function () {
var o = this.options;
var o = this.options, self = this;
var baseConfig = this._getBaseConfig();
return BI.extend(baseConfig, o.allowEdit ? this._getSearchConfig() : {
el: {
type: "bi.single_tree_trigger",
ref: function(_ref) {
self.textTrigger = _ref;
},
text: o.text,
height: o.height,
items: o.items,
@ -220,6 +223,10 @@ BI.MultiLayerSingleTreeCombo = BI.inherit(BI.Widget, {
return BI.extend(config, this._getSearchConfig());
},
getSearcher: function () {
return this.trigger ? this.trigger.getSearcher() : this.textTrigger;
},
setValue: function (v) {
v = BI.isArray(v) ? v : [v];
this.combo.setValue(v);

5
typescript/widget/multilayersingletree/multilayersingletree.combo.ts

@ -1,3 +1,4 @@
import { Trigger } from "../../base/single/trigger/trigger";
import { Widget } from "../../core/widget";
export declare class MultiLayerSingleTreeCombo extends Widget {
@ -12,5 +13,7 @@ export declare class MultiLayerSingleTreeCombo extends Widget {
getValue(): string[];
populate<T>(items: T[]): void
populate<T>(items: T[]): void;
getSearcher(): Trigger;
}

Loading…
Cancel
Save