[英]Stop the itemtap event when I tap in a button which is inside the item list, and keep the itemtap event if I press anywhere outside the button
您必須在按鈕點擊處理程序中包含event.stopEvent()。 這就對了。 :)
declineRequestButtonTap: function (self,event) {
console.log('decline button tap functionality'); //your code
event.stopEvent(); //this stops the itemtap event
},
onRequestItemTap: function (list, idx, el, record) {
console.log('I didn't press the button I pressed anywhere out of the button but inside the item list.') //your code
},
或者如果您在視圖內有監聽器
xtype: 'button',
flex: 1,
text: 'decline',
ui: 'decline',
listeners: {
tap: function (self,event) {
//your code
event.stopEvent();
}
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.