Column Actions Feature Guide
By default, Mantine React Table renders a column actions button for each column header. It contains a drop-down menu to help your users use the other features of the table. All of these actions can be triggered in some other way other than from this drop-down menu, so this serves as a UI/UX alternative to make sure your users can find many of the table features easily.
Relevant Table Options
# | Prop Name | Type | Default Value | More Info Links | |
---|---|---|---|---|---|
1 | boolean | true | MRT Column Actions Docs | ||
2 | ActionIconProps | (({table, column }) => ActionIconProps); |
| Mantine ActionIcon Docs | ||
3 | ({ closeMenu, column, table, internalColumnMenuItems }) => ReactNode |
| |||
Relevant Column Options
# | Column Option | Type | Default Value | More Info Links | |
---|---|---|---|---|---|
1 | boolean |
| MRT Column Actions Docs | ||
2 | ActionIconProps | ({ column, table }) => ActionIconProps |
| Mantine ActionIcon API | ||
3 |
|
| |||
Disable or Hide Column Actions Buttons
You can set the enableColumnActions
table option to false
to disable this feature and hide the button in each column header completely.
Alternatively, if you only want to hide the column actions button in specific columns, you can set the enableColumnActions
column option to false
instead.
In this demo, we disable the column actions button for the 'ID' column.
ID | First Name | Last Name |
---|---|---|
1 | Dylan | Murray |
2 | Raquel | Kohler |
Custom Column Actions Menu
If you do not like the default column actions menu items that Mantine React Table generates, you can provide your own custom menu items with the renderColumnActionsMenuItems
option.
ID | First Name | Last Name |
---|---|---|
1 | Dylan | Murray |
2 | Raquel | Kohler |
Justify Column Actions Button
By default, the column actions button is left aligned directly after the column header text and any sort or filter labels that may be present. If you want to change this, you can use a CSS selector in mantineTableHeadCellProps
to change the justify-content
property of the column header container.
ID | First Name | Last Name |
---|---|---|
1 | Dillon | Howler |
2 | Ross | Everest |
View Extra Storybook Examples