Class: Table
Constructs and renders responsive HTML tables driven entirely by schema and data configurations.
const table = new Table({
inData, // Array<Object> - Initial dataset
inColumns, // Array<Object> - Column definitions
inConfig, // Object - Table options (serial, head, foot)
inTheme, // String - "default" | "light" | "extraLight" | "dark" | "extraDark"
inTargetContainerId, // String - DOM element ID to mount into
dataProvider // Object - Optional REST data provider
});
Methods
| Method | Parameters | Returns | Description |
|---|---|---|---|
render({ inContainerId? }) |
{ inContainerId?: string } |
HTMLElement |
Compiles and mounts the full table to the target container. |
filterStateData({ query }) |
{ query: Object | string } |
void |
Applies an in-memory filter and triggers surgical repainting of body & footers. |
setTheme({ inTheme }) |
{ inTheme: string } |
void |
Switches the visual theme across the table without regenerating data. |
Class: Form
Generates declarative input controls, search bars, and filter groups with native event delegation.
const form = new Form({
inColumns, // Array<Object> - Column schemas for data types
inConfig, // Object - Fields layout and button actions
inTheme, // String - Theme variant
inTargetContainerId // String - DOM container element ID
});
Class: DataList
Creates native HTML5 <datalist> elements populated from datasets with optional frequency badge counting.
const dataList = new DataList({
inData, // Array<Object> - Source records
inColumns, // Array<Object> - Target fields
inConfig, // Object - Config options
inTargetContainerId // String - DOM mount ID
});
// Dynamically refresh suggestions after table filtering:
dataList.update({ data: newRecords });
Function: createDataProvider
Factory function returning a decoupled data provider with uniform read() and create() methods.
const dataProvider = createDataProvider({
inReadUrl: "/api/records",
inCreateUrl: "/api/records",
inHeaders: { "Authorization": "Bearer ..." }
});
const data = await dataProvider.read();