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

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).

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

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 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.