开发者

sencha touch :: useClearIcon listener in searchfield

开发者 https://www.devze.com 2023-03-19 20:57 出处:网络
is there a way to listen to the event, when the user clicks/tabs on the clearIcon in a seachfield? unfort. the keyup and change listeners are ignored then...

is there a way to listen to the event, when the user clicks/tabs on the clearIcon in a seachfield?

unfort. the keyup and change listeners are ignored then...

thn开发者_StackOverflow社区x!


I have put the following code on the onFirstActivate method of the panel:

var clearIconEl = this.getEl().down('[class="x-field-clear-container"]');
clearIconEl.on('click', this.handleClearIconClick, this);

this catches the clear icon click, though it depends on its undocumented css class.

UPDATE: I see two much more elegant solutions to this same problem at sencha touch textfield clear event I think I will use one of them myself...

0

精彩评论

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

关注公众号