Skip to main content

AgGrid Table

The AgGrid table component allows you to display an Ag Grid table.


Guide

If you are new to Ag Grid, check out our Introduction guide.

The following section details AgGrid Table component's specific settings. For more details on the App editor, check the dedicated documentation or the App editor Quickstart:

AgGird Table input

TypeConnectableTemplatableDefaultDescription
Array<Object>truefalseThe table data.

The array can be static (hardcoded) or dynamic through an eval function or a compute (inline script).

Example of static input:

[
{
"id": 1,
"name": "John Doe",
"age": 25
},
{
"id": 2,
"name": "Jane Doe",
"age": 30
}
]

Example of compute input:

export async function main() {
const res = await fetch('https://api.sampleapis.com/recipes/recipes', {
headers: { 'Content-Type': 'application/json' }
});
return res.json();
}

Controls

This component can be controlled by frontend scripts using these functions:

  • getAgGrid: Use the getAgGrid function to get the ag-grid instance of a table.
  • setSelectedIndex: Use the setSelectedIndex function to select a row in a table or an AG Grid table.

Table actions

AgGrid Table can define actions that will be displayed in each row of the table. An action is a component that cannot be moved.

Available components are:

AgGrid Actions

AgGrid Table configuration

NameTypeConnectableTemplatableDefaultDescription
Column DefsobjecttruefalseId, Name, AgeThe definition of the columns & their name.
FlexbooleanfalsefalsetrueAllows you to distribute available space among multiple elements to control their relative sizes and positions.
All EditablebooleanfalsefalsefalseWhether you want all columns to be editable.
Multiple SelectablebooleanfalsefalsefalseMake multiple rows selectable at once.
Row Multiselect With ClickbooleanfalsefalsetrueIf multiple selectable, allow multiselect with click.
PaginationbooleanfalsefalsefalseWhether you want pages on your table.
Select First Row By DefaultbooleanfalsefalsefalseWhether you want the first row to be selected by default.
Extra Configobjecttruefalse{}Extra configuration for the AgGrid table.
CompactnessselecttruefalsenormalChange the row height (normal, compact, comfortable).
Wrap ActionsbooleanfalsefalsefalseWrap the actions in the table.
FooterbooleanfalsefalsefalseShow the footer of the table.
Custom Actions HeaderstringtruefalseCustom header for the actions.

Outputs

NameTypeDescription
resultobjectThe AgGrid table data.
loadingbooleanThe loading state of the AgGrid table component
selectedRowobjectThe selected row
selectedRowIndexnumberThe selected row index
selectedRowsarrayThe selected rows
pagenumberThe current page
newChangesobjectThe latest updated row
readybooleanThe AgGrid table component is ready
inputsobjectThe outputs of each action organised by action id and array of outputs
filtersobjectThe filters applied to the table
displayRowCountnumberThe number of rows displayed on the table

Column Defs

The Column Defs input allows you to define the columns of the table. The columns are defined as an array of objects, where each object represents a column. The object has the following properties:

NameTypeDescription
fieldstringThe name of the field to display.
headerNamestringThe name to display (if different from the name of field).
editablebooleanWhether the column values can be edited by user.
minWidthnumberThe minimum width of the column.
flexnumberDynamically allocates remaining space of column based on its flex values.
hidebooleanWhether the column is hidden.
valueFormatterstringThe function to format the value of the column (Currencies, Date, Percentage, Uppercase etc.)
sortstringThe order of the column (asc or desc).
filterbooleanWhether the values of column can be filtered.
cellRendererTypestringThe type of cell renderer to use (link, image, button etc.)

AgGrid Infinite Table

The AgGrid Infinite Table component allows you to display an Ag Grid table with infinite scrolling.


With this SQL syntax, you can create a query that fetches data from the database and lets the component manage:

  • limit: Specifies the number of rows to display on a single page or to fetch from the server in one go (here, infinite).
  • isDesc: Specifies the order of the rows (ascending or descending).
  • offset: Specifies the number of rows to skip before starting to return rows.
  • search: A search bar added to the component.
  • orderBy: Specifies the column by which the data should be sorted.
-- $1 limit
-- $2 offset
-- $3 search
SELECT * FROM products WHERE title ILIKE '%' || $3 || '%'LIMIT $1::INT OFFSET $2::INT;

AgGrid Infinite Table

AgGrid Table EE

The AgGrid Table EE component allows you to display an Ag Grid table with the rest of AgGrid Enterprise features.

Its independent from Windmill's Enterprise Edition.

AgGrid Infinite EE

The AgGrid Infinite EE component allows you to display an Ag Grid table with infinite scrolling and the rest of AgGrid Enterprise features.