Browse Source

docs: update DataSources examples to dataResolver format (#6787)

Component-level data-variable props moved into the dataResolver
object in #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.
release-v0.23.3
Garvish Panchal 2 months ago
committed by GitHub
parent
commit
98b83da243
No known key found for this signature in database GPG Key ID: B5690EEEBB952194
  1. 18
      docs/modules/DataSources.md

18
docs/modules/DataSources.md

@ -52,8 +52,10 @@ editor.addComponents([
components: [ components: [
{ {
type: 'data-variable', type: 'data-variable',
defaultValue: 'default', dataResolver: {
path: 'my-datasource.id1.content', defaultValue: 'default',
path: 'my-datasource.id1.content',
},
}, },
], ],
}, },
@ -76,8 +78,10 @@ editor.addComponents([
components: [ components: [
{ {
type: 'data-variable', type: 'data-variable',
defaultValue: 'default', dataResolver: {
path: 'my-datasource.id1.content', defaultValue: 'default',
path: 'my-datasource.id1.content',
},
}, },
], ],
style: { style: {
@ -261,8 +265,10 @@ editor.addComponents([
components: [ components: [
{ {
type: 'data-variable', type: 'data-variable',
defaultValue: 'default', dataResolver: {
path: 'my-datasource.id1.counter', defaultValue: 'default',
path: 'my-datasource.id1.counter',
},
}, },
], ],
}, },

Loading…
Cancel
Save