Skip to content

docs: update DataSources examples to dataResolver format#6787

Open
Gxrvish wants to merge 1 commit into
GrapesJS:devfrom
Gxrvish:docs/datasources-dataresolver
Open

docs: update DataSources examples to dataResolver format#6787
Gxrvish wants to merge 1 commit into
GrapesJS:devfrom
Gxrvish:docs/datasources-dataresolver

Conversation

@Gxrvish

@Gxrvish Gxrvish commented Jul 8, 2026

Copy link
Copy Markdown

The DataSources docs still show the pre-#6495 flat shape for component-level
data-variable (defaultValue/path as top-level props). Since #6495 those
props live in the dataResolver object, and the old shape fails silently —
nothing renders and record updates are ignored (see the linked issue, where a
user copied the docs' counter example verbatim).

  • Updated the 3 component examples (components, styles section, counter) to the
    dataResolver shape, matching test/specs/data_sources/model/ComponentDataVariable.ts.
  • Style and trait data variables still use the flat shape (per
    test/specs/data_sources/dynamic_values/styles.ts / traits.ts), so those
    examples are unchanged.

Component-level data-variable props moved into the dataResolver
object in GrapesJS#6495, but the docs still showed the old flat shape,
which now fails silently (no render, no updates on record change).
Style and trait data variables keep the flat shape, so those
examples are left untouched.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant