Table Component: Visual Customizations
Waldur Homeport tables support standard rendering styles, layouts, and display options.
Visual Styling Classes
Apply standard CSS class strings to target table wrapper elements:
| Prop/Location | Type | Description |
|---|---|---|
className (Column) |
string |
Applied directly to <td> tags in that column (e.g. 'text-end'). |
headerClassName (Column) |
string |
Applied directly to column title <th> tags. |
headerClassName (Table) |
string |
Applied to the Card Header toolbar wrapper. |
titleClassName (Table) |
string |
Applied to the card title element. |
bodyClassName (Table) |
string |
Applied to the main Card.Body wrapper. |
Grid Mode Layout
Tables can alternate between lists and grid cards. In grid mode, data is displayed as cards in a responsive grid layout.
gridItem: React component class used to render each grid cell card.gridSize: Responsive grid column sizes config object (e.g.gridSize={{ sm: 6, md: 4 }}).gridSpace: Spacing level (0 to 6) between cards, mapped to the Bootstrap row gutter classg-{gridSpace}(defaults to6).gridFixedWidth: Boolean. When enabled, renders grid items inside a fixed CSS Grid container (className="grid-fixed-width") with a fixed card size instead of responsive columns.initialMode: Default display mode on load ('table'or'grid', defaults to'table').
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 | |
Dynamic Layout Resolution (initialModeResolver)
Use initialModeResolver to choose the default layout dynamically depending on the dataset size:
1 2 3 4 5 | |
Headers & ActionBar Visibility
Adjust header toolbar visibility and standalone modes:
hasActionBar={false}: Hides the card header toolbar (title, actions, search) entirely.hasHeaders={false}: Hides column titles (<thead>).hideIfEmpty={true}: Renders nothing (null) if the dataset contains no items.standalone={true}: Renders the table directly without the wrapping Metronic Card layout (prevents double borders/paddings when nested in tabs, drawers, or cards).
Table Title & Resource Customization
title: String or React Node overriding the table header title.hideTitle: Boolean to hide the title header.alterTitle: Auto-resolved page title calculated byuseTablefrom breadcrumbs. Used as a default fallback whentitleis not provided.subtitle: Secondary text displayed below the title.verboseName: Defines the resource type name. It is automatically title-cased as a fallback for the title header and used dynamically in empty and search-miss placeholder screens (e.g., "There are no projects yet.", "No projects found matching current filters.").emptyMessage: React Node to completely override the text displayed when the table contains zero rows.
Table-Wide Dropdown Actions
For list actions that affect the table globally, instead of using tableActions which renders buttons directly in the toolbar, you can group them into a 3-dots dropdown menu using the dropdownActions prop. Customize the size using dropdownActionsSize ('sm' or 'lg', default: 'lg'):
1 2 3 4 5 6 7 8 9 | |
Cache & Pagination Modifiers
staleTime: Pass insideuseTable(in milliseconds) to configure the underlying React Query cache, preventing the table from executing API queries on remount if data has been fetched within the stale time window.initialPageSize: Pass directly to<Table>to override the default pagination page size (which defaults to 10). Use thePAGE_SIZE_COMPACT(5) constant from@/table/constantsfor embedded/drawer tables, orPAGE_SIZE_FULL(10) for primary list views.rowClass: Pass a callback to apply custom styling to<tr>elements based on row data:
1 | |
equalColWidth: Set totrueto give all columns without an explicit width set the exact same width. By default, the first data column is allocated double the width of the remaining columns.- Row & Card Hover Shadows (
hoverShadow,hoverable): hoverShadow: Defaults totrue, displaying shadow elevation on cell/card hover. Can be customized with a boolean or a mode config object:hoverShadow={{ table: true, grid: false }}.hoverable: Set totrueto enable Bootstrap's.table-hoverbackground coloring on row hover. Defaults tofalse.
Placeholders Customization
Customize empty/error displays:
placeholderComponent: React Node rendering a custom blank slate instead of the default icon/text.placeholderActions: Action buttons rendered below the placeholder.placeholderHasRetry: Defaults totrue(renders a retry link on error). Set tofalseto hide the link.