HeaderMenu component wraps the Gantt component and adds a right-click context menu to the grid header row. Users can toggle column visibility from this menu.
Import
Basic usage
Wrap theGantt component with HeaderMenu:
Props
The Gantt API object. Obtain it by binding
this on the Gantt component. The header menu uses this reference to read the current column configuration and dispatch visibility changes.An object that controls which columns can be hidden by the user. The keys are column IDs and the values are
true to allow hiding that column.When set to null (the default), all columns are hidable.The
Gantt component to wrap. The header menu attaches its right-click listener to the grid header rendered inside this slot.Restricting which columns can be hidden
By default the menu lists every column. Pass acolumns map to limit the list:
The
text (Name) column is always visible and cannot be hidden via the menu regardless of the columns configuration.