Skip to Content

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 12020-04-10Anomaly detectionClosed1%CriticalHigh
Event 22020-04-11Anomaly detectionOpen2%MajorMedium
Event 32020-04-12Anomaly detectionClosed3%AverageLow
Event 42020-04-13Anomaly detectionOpen4%MinorHigh
Event 52020-04-14Anomaly detectionClosed5%CriticalMedium
Event 62020-04-15Anomaly detectionOpen6%MajorLow
Event 72020-04-16Anomaly detectionClosed7%AverageHigh
Event 82020-04-17Anomaly detectionOpen8%MinorMedium
rows
/ 1

No data table

Custom content, like an HvEmptyState, can be displayed inside table cells, by leveraging the native colSpan feature.

Name
Age
Role
No data to display.

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 12020-04-10Anomaly detectionClosed1%CriticalHigh
Event 22020-04-11Anomaly detectionOpen2%MajorMedium
Event 32020-04-12Anomaly detectionClosed3%AverageLow
Event 42020-04-13Anomaly detectionOpen4%MinorHigh
Event 52020-04-14Anomaly detectionClosed5%CriticalMedium
Event 62020-04-15Anomaly detectionOpen6%MajorLow
Event 72020-04-16Anomaly detectionClosed7%AverageHigh
Event 82020-04-17Anomaly detectionOpen8%MinorMedium
Event 92020-04-18Anomaly detectionClosed9%CriticalLow
Event 102020-04-19Anomaly detectionOpen10%MajorHigh
rows
/ 13

Grouping

Example of header grouping and row expansion via grouping

Status
Title
Time
Type
Probability
Event
Severity
Priority
Closed (6)Avg. 6%
Event 12020-04-10Anomaly detection1%CriticalHigh
Event 32020-04-12Anomaly detection3%AverageLow
Event 52020-04-14Anomaly detection5%CriticalMedium
Event 72020-04-16Anomaly detection7%AverageHigh
Event 92020-04-18Anomaly detection9%CriticalLow
Event 112020-04-20Anomaly detection11%AverageMedium
Open (6)Avg. 7%
Event 22020-04-11Anomaly detection2%MajorMedium
Event 42020-04-13Anomaly detection4%MinorHigh
Event 62020-04-15Anomaly detection6%MajorLow
Event 82020-04-17Anomaly detection8%MinorMedium
Event 102020-04-19Anomaly detection10%MajorHigh
Event 122020-04-21Anomaly detection12%MinorLow

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
rows
/ 1

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.