Browse Source

docs: update DataSources examples to dataResolver format

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.
pull/6787/head
Garvish Panchal 1 month ago
parent
commit
cd0e73384b
  1. 18
      docs/modules/DataSources.md

18
docs/modules/DataSources.md

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

Loading…
Cancel
Save