javascript - I want to use JsArray with the Webix component DataTable -


i want use jsarray webix component datatable. have 1 problem. when use jsarray format can’t update data in webix datagrid. unfortunately, can see beginning of data. check sample understand issue:

var array1 = [ [1,"marie","oslo"],[2,"john","los angeles"],[3,"kate","london"] ];  var array2 = [ [4,"martin","manchester"],[5,"joana","lisbon"],[6,"ronaldo","barcelona"],[7,"matthew","portland"] ];     webix.ui({      view:"button",       label:"test new data",       click: function() {          new_data()       }  });     webix.ui({      view:"datatable",      id: "mytable",      columns:[          {id:"data0", header:"id" },          {id:"data1", header:"name" },          {id:"data2", header:"city" }          ],                                            datatype: "jsarray",                      data: array1  });     function new_data () {         var mytable = $$("mytable");      mytable.parse(array2);  }

after pressing button “test new data”, 4 new empty lines appear in table.

to solve issue, should specify data format in parse command

mytable.parse(array2, "jsarray");

the component expect json data, default.

i hope it'll you)


Comments

Popular posts from this blog

html - Firefox flex bug applied to buttons? -

html - Missing border-right in select on Firefox -

python - build a suggestions list using fuzzywuzzy -