Forum Stats

  • 3,855,433 Users
  • 2,264,502 Discussions
  • 7,905,993 Comments

Discussions

[oj-table] is there any way to disable the touch end event

indraraj26-Oracle
indraraj26-Oracle Posts: 6 Employee
edited Dec 22, 2021 6:25AM in Oracle JET

Hi Folks,

I have some condition in oj-table like You will able to select multiple row of some group. I have added some checks on checkboxListener and discarding the check with

     if(isUserFromSameGroup(userId)) {
          // this is just for re-rendering even though it will not do anything 
          self.selectedItems.delete([key]);
          event.target.checked = false;
          event.preventDefault();
          event.stopPropagation();
          return false;
      }

isUserFromSameGroup  in this function i am checking whether user is from same group returning true/false.

self.selectionListener = (event) => {
      const selected = event.detail.value.row;
      self.selectedList([]);
      if(selected.values().size > 0) {
        const value = [];
        selected.values().forEach(keyValue => {
          value.push(keyValue)
        })
        self.selectedList(value)
      } 
    }

selectionListener has one global observable aka selectedList that holds the latest selected checked user.

This is all working fine if you manually check the checkbox one by one but with mouse left/right or hover over the checkbox in that situation sometime selectionListener is not invoking properly.

So is there any way i can disable the touch event for particular oj-table via id selector


Ref: https://www.oracle.com/webfolder/technetwork/jet-810/jetCookbook.html?component=table&demo=checkboxSelectableTable

Ojet Version: 8.2.0

Tagged:

Best Answer

Answers