swisnl / jQuery-contextMenu

jQuery contextMenu plugin & polyfill
https://swisnl.github.io/jQuery-contextMenu/
MIT License
2.25k stars 744 forks source link

Is it possible to hide a separator? #763

Closed Jogii closed 2 years ago

Jogii commented 2 years ago

Hi All .

I have a use case where i set visible false to items in context-menu based on some logic, now i want to hide the unnecessary separator above it . I tried the below code. It does not work. :( "separator5": { type: "cm_separator", visible: function (data) { if (//some condition, when true i want to hide the separator) { return false; } else { return true; } }, },

Jogii commented 2 years ago

Closing the issue, the separator visiblity works as expected. It was a manual error from my end.