[英]Clear Button not clearing the Search Filed in Select Dialog / Table Select dialog
I am using selectDialog and Tableselectdialog for value help in my input fields.我在输入字段中使用selectDialog和Tableselectdialog获取值帮助。
However, after searching, if I click the (X) button next to the search field, my search field doesn't get cleared.但是,搜索后,如果我单击搜索字段旁边的 (X) 按钮,我的搜索字段不会被清除。
Can anybody give any insight on how to achieve that?任何人都可以就如何实现这一目标提供任何见解吗? Since I don't see any events bounded to that field.
因为我没有看到任何与该领域相关的事件。
You can process it in the event search :您可以在事件搜索中处理它:
search : function(oControlEvent){
//Indicates if the user pressed the clear icon.
if(oControlEvent.getParameters().clearButtonPressed) HERE WRITE YOUR CODE;
}
This is how it worked for me (I only explicitly called the getParameters function)这就是它对我的工作方式(我只明确调用了 getParameters 函数)
<input type="text" id="myInput" >
<span class="close" onclick="clearText()">X</span>
function clearText(){
document.getElementById('myInput').value= ""
}
Just try this.试试这个。 Hope it works.
希望它有效。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.