Skip to Main Content

DevOps, CI/CD and Automation

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

indraraj26-OracleDec 22 2021 — edited Dec 22 2021

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
image.png
Ref: https://www.oracle.com/webfolder/technetwork/jet-810/jetCookbook.html?component=table&demo=checkboxSelectableTable
Ojet Version: 8.2.0

This post has been answered by John JB Brock-Oracle on Dec 22 2021
Jump to Answer
Comments
Post Details
Added on Dec 22 2021
2 comments
30 views