Table components have the following properties.
General
- Data source
- The array of objects to display in a table.
Values: query, demo data, components
Columns
Each column of data from the data source is represented here and has the following properties:
- Label
- The text that displays at the top of the column.
Value: string or expression - Data path
- JSON path to access values nested within objects and arrays of a given column.
Value: string or expression - Formatting
- The type of format that the column takes on.
Provided values: string, link, status pill, date / time, markdown, tags, percent bar, number, score bar, avatar - Sortable
- Determines whether the user can sort by the column.
Provided values: on, off
Some columns have additional properties based on their Formatting property.
- Has summary
- Determines whether to display a pagination summary directly above the table.
Provided values: on, off - Page size
- Number of rows per page to display.
Value: number or expression that evaluates to a number - Total count
- Total number of rows to display in the table.
Value: number or expression that evaluates to a number - Type
- Determines the type of pagination.
Provided values: client side, server side
Row actions
Adding a row action adds an Actions column to the table, which contains user-defined action buttons. These buttons have the following properties:
- Label
- The text that displays on the action button.
Value: string or expression - Primary
- Designed to call user attention to the most important action(s) for a given page or workflow.
Provided values: on, off - Borderless
- Removes the border from any button. On hover, it gets a background fill.
Provided values: on, off - Disabled
- Applies disabled styling and removes interactions.
Provided values: on, off - Level
- Controls the color of the button according to its intent.
Provided values: default, danger, success, warning - Reaction
- The reaction type the button triggers.
Values: custom, set component state, trigger query, open modal, close modal, open url, download file
- State Function
- fetch
Example: See events.
Appearance
- Is Loading
- Shows a loading indicator.
Provided values: on, off - Has text wrapping
- Determines whether cell text wraps.
Provided values: on, off
- Scrollable
- Determines what ways the table is scrollable in.
Provided values: both, vertical - Is Visible
- Determines whether the component is visible to the end-user. In edit mode, all components remain visible.
Provided values: on, off
Events
- Event
- Values: pageChange, tableRowClick
- Reaction
- Values: custom, set component state, trigger query, open modal, close modal, download file, set state variable value
- State Functions
- fetch
Example: See events. - setSelectedRow
Examples:table0.setSelectedRow(0)
sets the selectedRow
property of table0
to the first row.table0.setSelectedRow(null)
clears the selectedRow
property.
- setPageIndex
Example: table0.setPageIndex(0)
sets the pageIndex
property of table0
to the first page.
For more information on events, see Events.
Inspect data
Displays property and value pairs in JSON format.
Example
To view this component in context, see the Metrics Explorer & Monitors Builder app blueprint.
For examples showing how to use advanced features of tables, see Tables.