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
javascript
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:
json
{
"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.