From 34b277068ead96acef0a86d08954468fffa3e79f Mon Sep 17 00:00:00 2001 From: zsmj Date: Thu, 5 May 2022 16:31:35 +0800 Subject: [PATCH] =?UTF-8?q?Revert=20"=E6=97=A0JIRA=20bi.search=5Feditor=20?= =?UTF-8?q?=E5=9C=A8=E6=9C=89=E5=88=9D=E5=A7=8B=E5=80=BC=E7=9A=84=E6=97=B6?= =?UTF-8?q?=E5=80=99=E6=98=BE=E7=A4=BAclear=E6=8C=89=E9=92=AE"?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This reverts commit 172f50c994c2528b772e8c74680ebe3a0b2ce5fe. --- src/widget/editor/editor.search.js | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/widget/editor/editor.search.js b/src/widget/editor/editor.search.js index dac41e92d..af9a14614 100644 --- a/src/widget/editor/editor.search.js +++ b/src/widget/editor/editor.search.js @@ -32,8 +32,7 @@ BI.SearchEditor = BI.inherit(BI.Widget, { this.clear = BI.createWidget({ type: "bi.icon_button", stopEvent: true, - cls: "close-font", - invisible: !o.value + cls: "close-font" }); this.clear.on(BI.IconButton.EVENT_CHANGE, function () { self.setValue(""); @@ -124,6 +123,8 @@ 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 () { @@ -213,4 +214,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); \ No newline at end of file