Vega Table Operations JSON Reference List
Vega Table Operations JSON Reference List
Overview
Vega Table operations are the actions the Vega Table component performs. These actions include filtering, adding rows, removing rows, navigating to different table pages, and so on. But, instead of running operations in the Table component, you'll use logic components to control and trigger them.
Using the Operations Builder tool? View table operation descriptions in our Vega Table Operations article.
Each Vega Table operation holds key/value pairs called options. For each Vega Table option, enter the relevant option value to customize how your Vega Table operation performs. For example, the TABLE_SET_COLUMN_FILTER operation filters columns in the Vega Table component. The TABLE_SET_COLUMN_FILTER operation uses the ColumnFilter option key/value pair to determine the column you want to filter by.
To control and trigger Vega Table operations in logic components, use a new Outputs Enter outputs components and actions you want the component to perform. Type called VEGA_OPERATION. For the logic component's Outputs Value, enter the operation and options you want your Vega Table to perform.
Here is the basic template for performing an operation:
{
"type": "OPERATION_TYPE",
"options": {
// Options go here.
}
}
Vega Table Operations
Below is a list of all supported Vega Table operations you can use to control your Vega Table component.
This banner denotes that the operation requires you to enable a feature flag to use it. To learn more, view the Enabling Feature Flags section of this article.
Operation Type |
Description |
Option |
Example JSON |
---|---|---|---|
TABLE_ADD_COLUMN |
Adds a column to the table. |
You can add additional definitions, like label. If you do not provide label, it defaults to the label associated with the type of component. |
Copy
|
Adds an empty row to the table at a specified index. |
If no index is specified, a row adds to the bottom of the table. |
Copy
|
|
TABLE_CLEAR |
Removes all columns and rows from the table. |
|
Copy
|
TABLE_GO_TO_FIRST_PAGE |
Navigates to the first page of the table. |
Use enablePagination: true to allow pagination. |
Copy
|
TABLE_GO_TO_LAST_PAGE |
Navigates to the last page of the table. |
Use enablePagination: true to allow pagination. |
Copy
|
TABLE_GO_TO_NEXT_PAGE |
Navigates to the next page of the table. |
Use enablePagination: true to allow pagination. |
Copy
|
TABLE_GO_TO_PAGE |
Navigates to a specific page of the table. |
The first page has an index of 0. Use enablePagination: true to allow pagination. |
Copy
Copy
|
TABLE_GO_TO_PREVIOUS_PAGE |
Navigates to the previous page of the table. |
Use enablePagination: true to allow pagination. |
Copy
|
TABLE_SET_PAGE_SIZE |
Sets the number of rows displayed on each page. |
Use enablePagination: true to allow pagination. |
Copy
Copy
|
TABLE_REMOVE_COLUMN |
Removes a column from the table. |
|
Copy
|
TABLE_REMOVE_ROWS |
Removes a specified row(s) from the table. |
The target key of the row(s) to be removed.
The index for the row(s) to be removed. |
Copy
|
TABLE_SET_ACTION_TOOLBAR_VISIBILITY |
Displays or hides the action toolbar. |
|
Copy
|
TABLE_SET_COLUMN_FILTERS_VISIBILITY |
Displays or hides the column filter toolbar. |
|
Copy
|
TABLE_SET_COLUMN_FILTER |
Filters one or more columns. |
ColumnFilter = { id: string value: unknown } |
Copy
|
TABLE_SET_GLOBAL_FILTER_VISIBILITY |
Displays or hides the global filter toolbar. |
|
Copy
|
TABLE_SET_GLOBAL_FILTER |
Filters all columns simultaneously. |
|
Copy
|
TABLE_SET_COLUMN_PINNING |
Pins a column of the table. |
ColumnPinningState = { left: string[] right: string[] } |
Copy
|
TABLE_SET_COLUMN_VISIBILITY |
Displays or hides a column of the table. |
|
Copy
|
Offers additional control over filtering columns by data type. |
Filters string values include:
Learn more about each filters type in the Filters Types and Options section. |
Copy
|
|
TABLE_SET_GROUPING_CRITERIA |
Sets row grouping in the table. |
Use enableGrouping: true to allow row grouping. |
Copy
|
TABLE_SET_ROW_PINNING |
Pins a row of the table. |
RowPinningState = { top: string[] bottom: string[] } Use enableRowPinning: true to allow row pinning. |
Copy
|
TABLE_SET_SELECTED_ROW |
Highlights the selected row of the table. |
RowSelection = {[rowIndex: string]: boolean} Use enableRowSelection: true to allow row selection. |
Copy
|
TABLE_TOGGLE_GROUPING |
Enables or disables grouping. |
|
Copy
|
Filters Types and Options
The TABLE_SET_FILTER_TYPES operation enables granular control over a Vega Table's column filtering feature. Creators can specify the type of filter to use for each column, and control its specific effects. For example, you could limit the filter options for a column containing a drop-down list, or limit the the minimum and maximum range values of a column displaying the number data type.
Filter Types
The list below includes a description and available option for each filter type available to the TABLE_SET_FILTER_TYPES filter:
Filter Option | Description | Option Values | Example |
---|---|---|---|
checkbox |
Filters column by Boolean values. Useful for filtering data from a Single Checkbox component. |
|
Copy
|
date-range |
Filters column by date value and allows Creators to specify the date format that displays in the Vega Table's filter tool bar. Useful for filtering data from a Date Input component. |
|
Copy
|
multi-select |
Filters column by drop-down values that allow end-users to select multiple values. Useful for filtering data fields from a Checkboxes, Simple Select, or Search Select component containing multiple values. |
|
Copy
|
range |
Filters column by number values and presents as a Min and Max field to the end-user. Useful for filtering data from the Number component. |
|
Copy
|
range-slider |
Filters column by number values and presents as a slider to the end-user. Creators can set the minimum and maximum values end-users can filter by. Useful for filtering data from the Number component. |
|
Copy
|
select |
Filters column by drop-down values where the end-user can select a single value. Useful for filtering data values from a Dropdown, Simple Select, or or Search Select component. |
|
Copy
|
Filter Type Options
Creators us Filter type options to customize each filter type in a Vega table. The options listed below are available for some, or all filter types.
Setting | Supported Filters | Description |
---|---|---|
Use Faceted Values |
select multi-select |
When (checked), the Vega Table generates filter options for end-users using the unique values contained in the data. When, ☐ (unchecked), Creators manually enter a label and value for each option in the Filter Options list. |
Allow Filter Blanks |
text select multi-select |
Set to (checked) display an option to end-users that lets them filter for black values. |
Include Blanks in Filter |
All Filters |
Set to (checked) to include blank data values |
Enabling Feature Flags
Many of the Vega Table operations require you to enable them in your Initializer component. The table below provides you with the necessary syntax to enable pagination, row selection, grouping, and pinning.
Operation Type |
Description |
Option | Example JSON |
---|---|---|---|
SET_PROPERTY |
Enables those operations behind a feature flag. |
|
Copy
|
It's important to note that you can enable feature flags and perform Vega Table operations in the same Initializer component.
Resources