Skip to content

OpenUI Lang Syntax for Table component #461

@yangshuyi

Description

@yangshuyi

Describe the bug
There is a mismatch between the Table DSL format documented in OpenUI and the format expected by the renderer. When using the schema-style table definition returned by the LLM, the UI renders incorrect placeholder values instead of actual row data.

May I know which DSL is the officially correct format for table?

dataTable = Table( [ Col("Date", "string"), Col("System", "string"), Col("Consumption", "number"), Col("Status", "string") ], [ ["2025-11-26", "B01-PDU1/2", 32.0, "PEAK"], ["2025-11-28", "B01-PDU1/2", 32.0, "PEAK"], ["2025-12-10", "B01-PDU1/2", 32.0, "PEAK"], ["2025-12-25", "B01-PDU1/2", 0.2, "IDLE"], ["2025-12-30", "B01-PDU1/2", 32.0, "PEAK"] ] )

the rendered UI shows incorrect output like:

Date System Consumption Status
string number string string

To Reproduce
Can use the DSL to see the render result
dataTable = Table( [ Col("Date", "string"), Col("System", "string"), Col("Consumption", "number"), Col("Status", "string") ], [ ["2025-11-26", "B01-PDU1/2", 32.0, "PEAK"], ["2025-11-28", "B01-PDU1/2", 32.0, "PEAK"], ["2025-12-10", "B01-PDU1/2", 32.0, "PEAK"], ["2025-12-25", "B01-PDU1/2", 0.2, "IDLE"], ["2025-12-30", "B01-PDU1/2", 32.0, "PEAK"] ] )

React
`

import {Renderer} from "@openuidev/react-lang";
import {openuiLibrary} from "@openuidev/react-ui";

`

Expected behavior

Screenshots

Image

Desktop (please complete the following information):
@openuidev/react-lang@0.2.1
@openuidev/react-ui@0.11.2

Additional context
When I try Playground, and find the table DSL generated by Playground is different. something like below which can be rendered perfectly in browser.
root = Stack([tbl]) tbl = Table([col1, col2]) col1 = Col("Column A", ["Row 1", "Row 2"]) col2 = Col("Column B", ["Row 1", "Row 2"])

Image

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions