Browse Source

无JIRA bi.search_editor 在有初始值的时候显示clear按钮

es6
zsmj 2 years ago
parent
commit
172f50c994
  1. 7
      src/widget/editor/editor.search.js

7
src/widget/editor/editor.search.js

@ -32,7 +32,8 @@ BI.SearchEditor = BI.inherit(BI.Widget, {
this.clear = BI.createWidget({
type: "bi.icon_button",
stopEvent: true,
cls: "close-font"
cls: "close-font",
invisible: !o.value
});
this.clear.on(BI.IconButton.EVENT_CHANGE, function () {
self.setValue("");
@ -123,8 +124,6 @@ BI.SearchEditor = BI.inherit(BI.Widget, {
this.editor.on(BI.Editor.EVENT_STOP, function () {
self.fireEvent(BI.SearchEditor.EVENT_STOP);
});
this.clear.invisible();
},
_checkClear: function () {
@ -214,4 +213,4 @@ BI.SearchEditor.EVENT_ENTER = "EVENT_ENTER";
BI.SearchEditor.EVENT_RESTRICT = "EVENT_RESTRICT";
BI.SearchEditor.EVENT_REMOVE = "EVENT_REMOVE";
BI.SearchEditor.EVENT_EMPTY = "EVENT_EMPTY";
BI.shortcut("bi.search_editor", BI.SearchEditor);
BI.shortcut("bi.search_editor", BI.SearchEditor);

Loading…
Cancel
Save