I am attempting to add n DataTables into a parent view. Each DataTable has 2 rows. When I loop through the data to populate the individual DataTables using $$(“parent”).addView(newDataTable), only the first DataTable in the loop gets the data. The remaining DataTables show up, but they have no rows.
I am not sure if this is a Webix issue, or a JavaScript issue.
I am re-using a template dataTableTemplates[“TEST”] and that is causing the data to only populate in the top-most DataTable (the first one added to the parent view)
The thing is that inner Datatable logic modifies columns configuration, so you cannot safely reuse it as is. You need to make a copy of the columns configuration object, if you want to use the same afterwards:
You should copy not the columns of an already initialized datatable, but the array of columns’ configurations that you want to provide for each particular datatable.