Skip to content

[plugin-dashboard] a table widget with inline static data crashes into the error boundary — "Maximum update depth exceeded" #4618

Description

@yinlianghui

Measured while implementing (d1) of #4600 (PR #4615), probing which widget data surfaces render in the docs gallery. Filed unassigned; not fixed there — packages/plugin-dashboard/src/** was outside that card's scope. Duplicate-searched (keyword + data-table path): no open issue covers it.

Reproduction, measured on origin/main @ c1d939f7f

Rendered through the real SchemaRenderer, with @object-ui/components + @object-ui/plugin-dashboard + @object-ui/plugin-charts registered:

{
  "type": "dashboard", "columns": 2, "gap": 4,
  "widgets": [
    { "id": "t", "title": "Recent Invoices", "type": "table",
      "options": { "data": [ { "name": "INV-1", "amount": 100 },
                             { "name": "INV-2", "amount": 200 } ] } }
  ]
}

Rendered output (textContent, one role="alert"):

Recent InvoicesComponent "data-table" failed to render
Maximum update depth exceeded. This can happen when a component repeatedly calls
setState inside componentWillUpdate or componentDidUpdate. React limits the
number of nested updates to prevent infinite loops.
Retry

The same probe rendered bar, line, area, donut and metric widgets from the identical static surface with no alert and a mounted chart container, so the defect is specific to the table family (dispatch.family === 'table'), which DashboardRenderer.getComponentSchema maps to:

return { type: 'data-table', ...options, data: Array.isArray(widgetData) ? widgetData : widgetData?.items || [],
         searchable: false, pagination: false, className: "border-0" };

Not established here: whether the loop lives in data-table itself or in what the dashboard spreads onto it (note ...options spreads the author's options, including the data key, before data is set — so data is passed twice from two derivations). A one-line reproduction against data-table directly would settle that, and is the obvious first step.

Why it matters

table is a spec-enumerated dashboard widget type and the static options.data surface is live and documented (content/docs/guide/dashboard-filters.md describes static-data widgets as a supported, unfiltered surface). No catalog entry exercises it, which is why nothing caught this — PR #4615 chose chart/metric surfaces for the entries it rewrote and never landed on table.

Adjacent, not the same: this is the STATIC path. The provider: 'object' path routes to object-data-table instead and is untested here.

Refs #4600, PR #4615.


Generated by Claude Code

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