This page showcases various examples of tables using the HvTable components and useHvTable hook and its plugin,
using the recommended Table component abstraction
Simple table
A simple stateless table leveraging the columns configuration.
Title | Time | Event Type | Status | Probability | Severity | Priority | ||
|---|---|---|---|---|---|---|---|---|
| Event 1 | 2020-04-10 | Anomaly detection | Closed | 1% | Critical | High | ||
| Event 2 | 2020-04-11 | Anomaly detection | Open | 2% | Major | Medium | ||
| Event 3 | 2020-04-12 | Anomaly detection | Closed | 3% | Average | Low | ||
| Event 4 | 2020-04-13 | Anomaly detection | Open | 4% | Minor | High | ||
| Event 5 | 2020-04-14 | Anomaly detection | Closed | 5% | Critical | Medium | ||
| Event 6 | 2020-04-15 | Anomaly detection | Open | 6% | Major | Low | ||
| Event 7 | 2020-04-16 | Anomaly detection | Closed | 7% | Average | High | ||
| Event 8 | 2020-04-17 | Anomaly detection | Open | 8% | Minor | Medium |
No data table
Custom content, like an HvEmptyState, can be displayed inside table cells, by leveraging the native colSpan feature.
Name | Age | Role | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Client-side table
A client-side table supporting the most commonly used table features: row sorting, selection, filtering and actions, sticky header and columns, row pagination, and bulk actions.
Since filtering depends on access to the table instance utilities (such as setFilter and setGlobalFilter), the table instance is exposed via a tableRef.
Title | Time | Event Type | Status | Probability | Severity | Priority | ||
|---|---|---|---|---|---|---|---|---|
| Event 1 | 2020-04-10 | Anomaly detection | Closed | 1% | Critical | High | ||
| Event 2 | 2020-04-11 | Anomaly detection | Open | 2% | Major | Medium | ||
| Event 3 | 2020-04-12 | Anomaly detection | Closed | 3% | Average | Low | ||
| Event 4 | 2020-04-13 | Anomaly detection | Open | 4% | Minor | High | ||
| Event 5 | 2020-04-14 | Anomaly detection | Closed | 5% | Critical | Medium | ||
| Event 6 | 2020-04-15 | Anomaly detection | Open | 6% | Major | Low | ||
| Event 7 | 2020-04-16 | Anomaly detection | Closed | 7% | Average | High | ||
| Event 8 | 2020-04-17 | Anomaly detection | Open | 8% | Minor | Medium | ||
| Event 9 | 2020-04-18 | Anomaly detection | Closed | 9% | Critical | Low | ||
| Event 10 | 2020-04-19 | Anomaly detection | Open | 10% | Major | High |
Grouping
Example of header grouping and row expansion via grouping
Status | Title | Time | Type | Probability | Event | |
|---|---|---|---|---|---|---|
Severity | Priority | |||||
| Closed (6) | Avg. 6% | |||||
| Event 1 | 2020-04-10 | Anomaly detection | 1% | Critical | High | |
| Event 3 | 2020-04-12 | Anomaly detection | 3% | Average | Low | |
| Event 5 | 2020-04-14 | Anomaly detection | 5% | Critical | Medium | |
| Event 7 | 2020-04-16 | Anomaly detection | 7% | Average | High | |
| Event 9 | 2020-04-18 | Anomaly detection | 9% | Critical | Low | |
| Event 11 | 2020-04-20 | Anomaly detection | 11% | Average | Medium | |
| Open (6) | Avg. 7% | |||||
| Event 2 | 2020-04-11 | Anomaly detection | 2% | Major | Medium | |
| Event 4 | 2020-04-13 | Anomaly detection | 4% | Minor | High | |
| Event 6 | 2020-04-15 | Anomaly detection | 6% | Major | Low | |
| Event 8 | 2020-04-17 | Anomaly detection | 8% | Minor | Medium | |
| Event 10 | 2020-04-19 | Anomaly detection | 10% | Major | High | |
| Event 12 | 2020-04-21 | Anomaly detection | 12% | Minor | Low | |
Custom cell content
Example of custom cell content rendering
Id | Title | Time | Event Type | Status | Probability | Severity | Priority | ||
|---|---|---|---|---|---|---|---|---|---|
| 1 | Event 1 Description for event 1 | 2020-04-10 | Anomaly detection | Closed | 10% | Critical | High | ||
| 2 | Event 2 Description for event 2 | 2020-04-11 | Anomaly detection | Open | 20% | Major | Medium | ||
| 3 | Event 3 Description for event 3 | 2020-04-12 | Anomaly detection | Closed | 30% | Average | Low | ||
| 4 | Event 4 Description for event 4 | 2020-04-13 | Anomaly detection | Open | 40% | Minor | High | ||
| 5 | Event 5 Description for event 5 | 2020-04-14 | Anomaly detection | Closed | 50% | Critical | Medium | ||
| 6 | Event 6 Description for event 6 | 2020-04-15 | Anomaly detection | Open | 60% | Major | Low | ||
| 7 | Event 7 Description for event 7 | 2020-04-16 | Anomaly detection | Closed | 70% | Average | High | ||
| 8 | Event 8 Description for event 8 | 2020-04-17 | Anomaly detection | Open | 80% | Minor | Medium |
Other examples
You can find more table examples in our Stackblitz Tables collection . In there, you’ll find various custom table use-cases, such as server-side , infinite scroll , sticky column resizing , etc.