Table ​
Display tabular data with sorting, filtering, and pagination powered by AgGrid.
Examples ​
Column Options ​
Configure column pinning, min/max widths via AgGrid's ColDef. Some common configurations include pinned: left/right, max/minWidth, resizable, sortable, cellClass
Quick Filter ​
Show a text input above the table for quick row filtering.
Custom Filter Input ​
For a custom search UI, skip the quickFilter prop and pass quickFilterText directly via agGridOptions.
Pagination ​
Enable pagination with configurable page sizes.
Row Size ​
Use the rowSize prop to switch between pre-defined row heights: md (44px) and lg (64px).
Custom Cell Renderer ​
Use Vue components as cell renderers for rich cell content. The component receives params (of type ICellRendererParams) with access to the cell value and row data.
WARNING
- When using
CellRenderer, HRM will not work, we have to manual refresh the page - Dev tool cannot inspect
CellRenderercomponents
AgGrid Options ​
All other AgGrid options can be passed via the agGridOptions prop. See the AgGrid documentation for the full list.
Edge cases ​
getRowId- Using
getRowIdwill remove Vue's reactivity when accessing data via params - e.g. cell renderer's params (ICellRendererParams) - We need to use functions such as
setDatato update the row data - Known Issue
- Using
Line height
- AgGrid computes its line-height programmatically based on properties like row height, auto height, vertically padding ratio, etc. and we cannot set a fixed line-height
- Therefore, in some places we need to overwrite with a line-height in order to make the content display correctly - e.g. using
!text-smincellClass
Auto height
- By default,
HTableusesautoHeightto fit the table into its container - AgGrid's
autoHeighthas a default min width of 150px, Holistics is currently overwriting it with a min width of 80px instead
- By default,