You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The documentation for the datasource attribute on the property type says to return a payload that looks like this:
{
action,
event,
context,
payload: {
event: "getColors",
items: [{
label: 'Primary Colors',
children: [{
label: 'Red',
value: '#ff0000'
}, {
label: 'Green',
value: '#00ff00'
}, {
label: 'Blue',
value: '#0000ff'
}]
}, {
label: 'Black',
value: '#000000'
}, {
label: 'White',
value: '#ffffff'
}]
}
}
But as of writing this the SDK does not work using this payload structure, the select list is empty after the call returns.
However the callback works perfectly if the payload looks like below, so either the SDK is not behaving as designed, or the documentation does not reflect the SDK:
{
event: "getColors",
items: [{
label: 'Primary Colors',
children: [{
label: 'Red',
value: '#ff0000'
}, {
label: 'Green',
value: '#00ff00'
}, {
label: 'Blue',
value: '#0000ff'
}]
}, {
label: 'Black',
value: '#000000'
}, {
label: 'White',
value: '#ffffff'
}]
}
The text was updated successfully, but these errors were encountered:
Thank you for pointing this out! The SDPI components are a work in progress, we are actively working on integrating the UI components fully into the SDK.
The documentation for the datasource attribute on the property type says to return a payload that looks like this:
{
action,
event,
context,
payload: {
event: "getColors",
items: [{
label: 'Primary Colors',
children: [{
label: 'Red',
value: '#ff0000'
}, {
label: 'Green',
value: '#00ff00'
}, {
label: 'Blue',
value: '#0000ff'
}]
}, {
label: 'Black',
value: '#000000'
}, {
label: 'White',
value: '#ffffff'
}]
}
}
But as of writing this the SDK does not work using this payload structure, the select list is empty after the call returns.
However the callback works perfectly if the payload looks like below, so either the SDK is not behaving as designed, or the documentation does not reflect the SDK:
{
event: "getColors",
items: [{
label: 'Primary Colors',
children: [{
label: 'Red',
value: '#ff0000'
}, {
label: 'Green',
value: '#00ff00'
}, {
label: 'Blue',
value: '#0000ff'
}]
}, {
label: 'Black',
value: '#000000'
}, {
label: 'White',
value: '#ffffff'
}]
}
The text was updated successfully, but these errors were encountered: