medialize/jQuery-contextMenu — pull request #177 by giskard22 (2013-11-06 23:51:37+00:00)
Title: Added preserveState option to prevent resetting of menu item states

Every time a menu opens, its items are refreshed with their original state: items are re-disabled (or enabled), checkbox and radio "checked" properties are reset, text inputs are emptied. I added a "preserveState" menu option that skips these resets.

I'm using this with filters for table data. Each menu is a list of checkboxes that add criteria to the filter. When the user opens the menu, she should see controls that match the current filters. I did not want to have to modify each menu's options.items object with every change.