bootstrap-table-contextmenu icon indicating copy to clipboard operation
bootstrap-table-contextmenu copied to clipboard

onContextMenuItem mouse click type

Open waspinator opened this issue 9 years ago • 3 comments

Thanks for making this. It's made adding actions to tables much easier.

Most links on the internet seem to allow a user to right click on them to bring up the native browser context menu and then selecting to open them in a new tab for example. They also usually open in a new tab when clicking on them using the middle mouse click.

Is there a way I could inject the href into each menu item before opening the menu, and keep the menu open when right clicked so as to show the native link context menu?

Thanks again for your work on this plugin.

waspinator avatar Mar 13 '16 16:03 waspinator

Looking into this, this weekend. Sorry for the delay.

prograhammer avatar Apr 29 '16 19:04 prograhammer

It is possible to keep the browser context menu at least when using a contextMenuButton ? Without that it's impossible for users to right-click and copy text or use a open link... Thanks

nicgravel avatar May 04 '16 17:05 nicgravel

@nicgravel Yeah, you could do something like this for now:

        beforeContextMenuRow: function(e, row, buttonElement){
            if(!buttonElement){
                row.dispatchEvent(e);
                return;
            }
            else {
                $table.bootstrapTable('showContextMenu',{event:e, contextMenu:'#my-button'});
            }  
            return false;
        }

prograhammer avatar Aug 02 '16 06:08 prograhammer