I try to make a custom tabview for a specific project related setup. The general idea of what the tabview should show is like this structure:
view: "tabview",
cells: [{
header: "Children",
body: {
view: "datatable",
url: "groups/"+aid+"/children",
...
}
},{
header: "Data",
body: {
view: "edgeform",
edgeurl: "groups/"+aid,
...
}
}]
As seen, I want this one variable field to be flexible and be taken from the configuration of the component instance. What I tried in general is the direction of:
import * as webix from ‘@xbs/webix-pro’;
webix.protoUI({
name: "edgegroup",
$init: function(config){
var aid = config.aid;
.... here i try to add the tabview, like with adding to config.rows ...
}
}, webix.EventSystem, webix.ui.view);
But whatever I try, it always ends up with some error or nothing showing up at all. I also tried to use protoUI to extend webix.ui.tabview, but sadly, it always complains about the missing cells definition cause the $init of tabview is called before my $init of my custom component, so i cant attach the cells before it checks.
What would be the most official way to make something so simple? I really just want to have a combination of components that I can spice with dynamic variables.
As a bonus round, how would be made such a thing with a delayed setup? I saw some examples with “deferred layout”, but would be interested in good solution for the classical “show ajax load icon, load stuff, display widget” workflow.
Thanks in advance!