开发者

sencha touch :: useClearIcon listener in searchfield

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

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜