簡體   English   中英

當我點擊項目列表內的按鈕時,停止itemtap事件;如果在按鈕外的任何地方按一下,則保持itemtap事件

[英]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.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM