开发者

How to "reset" Lovecombo combobox?

开发者 https://www.devze.com 2023-02-09 04:38 出处:网络
I have form with lovocombo of cities on it. At start current value of lovecombo is emptyText value = \"Select city\".

I have form with lovocombo of cities on it. At start current value of lovecombo is emptyText value = "Select city". Then i select any options and submit form, and current values changed to 'London' (for example). Else there is "reset" button on the form, which have handler:

handler: function (){

lovecombo.setValue(false);
lovecombo.clearValue();

}

but Lovecombo don`t takes on emptyText value = "Select city", when "reset" button is clicked.

How to reset or set emptyText value to Loveco开发者_开发技巧mbo?

PS: sorry for my english.

lovecombo homepage http://lovcombo.extjs.eu/


Since LovCombo extends Ext.form.ComboBox, it inherits the reset() method. Try:

handler: function() {
  lovecombo.reset();
}
0

精彩评论

暂无评论...
验证码 换一张
取 消