Skip to content
🚀 Rapid Application Development with the App Builder

postQuery ​

The postQuery hook allows developers to execute custom code after a query is performed.

Parameters ​

ParameterTypeDescription
tablereferenceTable instance and state.

Structure parameter table ​

js
table: {
	instance: *ref_to_table_api,
	state: *ref_to_table_store,
	requery: *ref_to_requery_table_function,
}

The requery function supports two optional parameters:

js
requery(recalculateRowCount, enableLoadingFeedback)
  • recalculateRowCount: When true, forces a row count recalculation. (default: false)
  • enableLoadingFeedback: When false, disables the spinner and progress bar. (default: true)

Return Value ​

None

✨ Example Accessing Rows ​

The postQuery hook gives you access to all rows. The code snippet below grabs the rows and stores them in the variable window.currentRows.

js
((table) => {

    window.currentRows = table.instance.getRowModel().rows.map(r => r.original)
    console.log(window.currentRows)

})
  • The example code displays the records on the console, but you can use the created variable window.currentRows both inside and outside your app.
  • Rows cannot be changed and then written back into the table.
  • Make sure to delete the created variable (window.currentRows) in your onAppClose hook.