brixxbox Wiki
Ask or search…
K

onSubDataRequest

This event is called when a subDataSource is requested. You can return the data here instead of fetching it from the server automatically

Example Usages

return [
{
id: 1,
name: "Germany"
},
{
id: 2,
name: "Netherlands"
},
{
id: 3,
name: "Poland"
},
]

Example Usages 2

return [
(app.loadConfigRecordById("item", 1)).data,
(app.loadConfigRecordById("item", 2)).data,
(app.loadConfigRecordById("item", 3)).data,
]

Example Usages 3

return [
{
id:1,
itmName: "lorem",
itmPrice: 1.23,
itmReleaseDate: moment().add(1, "days").toISOString(),
itmDescription: "some Text",
},
{
id:2,
itmName: "ipsum",
itmPrice: 4.56,
itmReleaseDate: moment().add(5, "days").toISOString(),
itmDescription: "some more Text",
}
];