Hi,
I have a dashboard, this dashboard receive panels from factory like this:
ARR_ENTERY_PANELS = [{
"id": "new_template:1551264265937", "name": "new_template", "x": 2, "y": 0, "dx": 1, "dy": 1,
"data": { "title": "A", "value":1500 }
},
{
"id": "new_template:1551265735338", "name": "new_template", "x": 4, "y": 0, "dx": 1, "dy": 1,
"data": { "title": "b", "value":2500 }
}];
function panelFactory(obj) {
// common panel structure
obj.view = "panel";
obj.css= "webix_shadow_big";
obj.icon = "wxi-drag";
switch (obj.name) {
case "new_template":
return createTemplate(obj);
}
function createTemplate(obj) {
obj.resize = true;
obj.body = {
rows: [
{ type: "header", template: "<div class='unititle'>#title#</div>", data:obj.data },
{ template: "<div class='unicontent'>#value#</div>", data: obj.data}
]
};
return obj;
};
Panels show data correctly and show button edit in every panel, when is pressed show a popup form, showing field tittle and field value. When click button get form data and update $$(panelid).config.data
let formdata = $$("formid").getValues();
$$("panelid").config.data = formdata;
in a console.log($$(“panelid”)) i can see config.data updated, but in dashboard not appear changes, then when i try to do
$$(“panelid”).refresh() //error is not a function
or
$$(“panelid”).render()> //error is not a function
Please How to can update the panel data of a dashboard widget?
Thanks in advance!!!