Skip to content

AgGrid Table

The AgGrid table component enables you to display an Ag Grid table within Orvanta applications.

PropertyTypeConnectableTemplatableDefaultDescription
DataArray<Object>truefalseThe table data, which can be static or dynamic through eval functions or inline scripts
[
{
"id": 1,
"name": "John Doe",
"age": 25
},
{
"id": 2,
"name": "Jane Doe",
"age": 30
}
]
export async function main() {
const res = await fetch('https://api.sampleapis.com/recipes/recipes', {
headers: { 'Content-Type': 'application/json' }
});
return res.json();
}

The component supports frontend script functions:

  • getAgGrid: Retrieves the ag-grid instance of a table.
  • setSelectedIndex: Selects a row in the table.

AgGrid tables support row-level actions using these components:

  • Button
  • Toggle
  • Select
NameTypeConnectableTemplatableDefaultDescription
Column DefsobjecttruefalseId, Name, AgeColumn definitions and names
FlexbooleanfalsefalsetrueDistributes available space among elements
All EditablebooleanfalsefalsefalseMakes all columns editable
Multiple SelectablebooleanfalsefalsefalseAllows selecting multiple rows
Row Multiselect With ClickbooleanfalsefalsetrueEnables multiselect via clicking
PaginationbooleanfalsefalsefalseEnables table pagination
Select First Row By DefaultbooleanfalsefalsefalseAuto-selects the first row
Extra Configobjecttruefalse{}Additional AgGrid configuration
CompactnessselecttruefalsenormalRow height options: normal, compact, comfortable
Wrap ActionsbooleanfalsefalsefalseWraps actions in the table
FooterbooleanfalsefalsefalseShows the table footer
Custom Actions HeaderstringtruefalseCustom header for actions
NameTypeDescription
resultobjectThe AgGrid table data
loadingbooleanLoading state
selectedRowobjectThe selected row
selectedRowIndexnumberThe selected row index
selectedRowsarrayAll selected rows
pagenumberCurrent page number
newChangesobjectLatest updated row
readybooleanComponent readiness state
inputsobjectAction outputs organized by action ID
filtersobjectApplied filters
displayRowCountnumberNumber of rows displayed

Column objects support these properties:

PropertyTypeDescription
fieldstringField name to display
headerNamestringDisplay name (if different from field)
editablebooleanAllows user editing
minWidthnumberMinimum column width
flexnumberAllocates remaining space based on flex value
hidebooleanHides the column
valueFormatterstringFormats values (currencies, dates, percentages, etc.)
sortstringSort order: asc or desc
filterbooleanEnables column filtering
cellRendererTypestringCell renderer type (link, image, button, etc.)

The infinite table variant supports infinite scrolling with SQL parameters:

  • $1 (limit): Rows per fetch
  • $2 (offset): Rows to skip
  • $3 (search): Search bar integration
  • orderBy: Sort column
  • isDesc: Sort direction
SELECT * FROM products
WHERE title ILIKE '%' || $3 || '%'
LIMIT $1::INT OFFSET $2::INT;
  • AgGrid Table EE: Full AgGrid Enterprise features.
  • AgGrid Infinite EE: Infinite scrolling with AgGrid Enterprise capabilities.