How to disable mouse right button click on Alarm Status Table component's header in perspective project?

About Alarm Status Table component in Perspective,
I want to use header of table then set 'enableHeader' to true.

But I want my client not to able to click this header with mouse right button to prevent them configuring columns.
I don't want to expose the tag path with Display Path or Source column.

In this case, is it possible to do this?

You should be able to set the css prop pointer-events: none. Just not sure where to put it without being at my laptop

Thank you for your reply.
I tried your solution, and checked that mouse click on table header is disabled.
But, what I want to do is not to disable the left mouse click, but to disable the right mouse click only.
I'll have to think of your solution as the next best thing and implement it.
Thank you again.

I resolved this problem by style injection(a.k.a css injection).
The key is not to expose internal information of our system to customers by activating attributes(columns) such as 'Source' and 'Display Path'.

Of course I know that CSS injection is just a mimic, not a proper prescription.
Just share the way of mimic.

  1. Create style to be applied to Alarm Status Table component.

  2. Fill the property background-color with following value, click OK.

    } .contextMenuCommon {display: none !important;} {
    
  3. Apply the style to Alarm Status Table.

  4. Done. You can both left and right click, but cannot see the alarm table configuration menu.

I'll check Ignition v8.1.22 or later to try new feature further.

Unfortunately, this approach will also probably impact other components. The Table, Video Player, and also the Alarm Journal Table use the contextMenuCommon class to render a context menu, and if you have any of those component present on the same page as the Alarm Status Table which has this workaround I would expect their context menus to stop working.

I don't see a better way to disable the header context-click column configurations, but you should be aware of the potential impacts of going this route.

i guessss you could mess yourway in with js-inject and remove the event listener of context menu only for that component its header/columns...
Tho that kinda isnt 100% guarenteed to prevent them from triggerering it other ways, sinze it would be client site (just like the css pointer-events can be bypassed too) if they know how, atleast it will be hidden for common users

@UnSuk_Song im just out of holidays so i got a bunch of work piled up at the moment, ping me in 2 weeks if i didnt do anything yet xd

1 Like

Yes you're right.
I have checked right away after I resolved the problem in this way.
As you expected, all the components have name of selector contextMenuCommon has been affected by the style.
Maybe I should apply it this way as a temporary measure.

Thank you for your concern.