Creates a new DataTableRef.
The data table ID (e.g. 'tbl_menu_items')
Optionaloptions: IDataTableOptionsOptional configuration overrides
Fetches rows from the data table.
Optionalparams: IDataTableQueryParamsOptional query parameters (filter, sort, pagination)
Promise resolving to the result set
const result = await dt.getRows({
filter: { category: 'Entree', price: { op: 'lte', value: 25 } },
sort: 'itemName',
sortDir: 'asc',
pageSize: 20
});
Fetches the table schema (column definitions and metadata).
Promise resolving to the table schema
Gets visible (non-hidden) columns from the table schema.
Promise resolving to an array of visible column definitions
Fetches rows with hidden column data stripped.
Optionalparams: IDataTableQueryParamsOptional query parameters (same as getRows)
Promise resolving to the result set with hidden fields removed
Removes a previously registered callback for a data table change event.
The event type
The callback to remove
Registers a callback for a data table change event.
The event type: 'rowUpdated', 'rowCreated', or 'rowDeleted'
Function to call when the event fires
dt.on('rowUpdated', (change) => console.log('Row updated:', change));
dt.on('rowCreated', (change) => console.log('Row created:', change));
dt.on('rowDeleted', (change) => console.log('Row deleted:', change));
Framework-agnostic wrapper around the global
gadgets.reveldigital.datatablelibrary.Provides typed Promise-based methods and callback-based event handling for real-time updates.