Table Dialog
The table dialog imports simple structured rows from CSV/XLSX files and saves them into the document payload.
Use table for lightweight row data that templates render as charts, facts, lists, or custom tables. Use spreadsheet when you need the richer spreadsheet editor output with generated HTML and workbook state.
Parameters
type(enum, required:"table"): Opens the Table dialog.path(string, required): Payload path where the dialog response is stored.state.data(array, optional): Existing rows to reopen in the dialog.value(optional): Current table value.config(object, optional): Reserved for table import options.
dataloader is still accepted as a legacy alias for existing templates, but new templates should use table.
Example Usage
export default ({ payload }) => {
const { table_response } = payload;
return (
<div onClick={() => $uhuu.editDialog({ path: "table_response", type: "table" })}>
<div className="chart-container">
<Chart data={table_response?.data} />
</div>
</div>
);
};Example Response
After saving, the payload at path receives an object with a data array:
{
"table_response": {
"data": [
[{ "value": "Month" }, { "value": "Revenue" }],
[{ "value": "January" }, { "value": 100 }],
[{ "value": "February" }, { "value": 200 }]
]
}
}Render the saved data in the template as needed. The table dialog does not return spreadsheet HTML; for that, use the spreadsheet dialog.
Schema-bound fields
If a field is bound to a uhuu DataTable schema primitive ({ columns, rows } of strings) rather than storing this { data } matrix directly, the editor host converts between the two automatically — the schema DataTable is supplied as the dialog's state.data on open and converted back (merged onto the original, preserving fields like caption) on save. See Schema-bound fields on the Chart page for the full explanation.