Is there a way to define a Datatable Cell template that returns a UI view component directly? I think i can add a pie chart to a Datatable cell by placing a div into the template and then inserting the chart into the div, but I’m wondering if there’s an easier way I’m missing.
It is a bit expensive way to organize UI. Datatable will repaint its data when any changes occur, so it will need to reconstruct chart again and again. If you need to organize just a few elements in rows, check webix layout.
As for original question - nope, template must return the HTML string, there is no way to return the component directly.
Hi Maksim, any thoughts on how to place a view within a cell? It’d be a great blog article.
Yep, using sparklines in datatable sounds as a good scenario. We will check how it can be implemented without too much code trickery.
Thanks, Maksim! I’m looking to only store a couple of sparklines and pie charts in a small datatable. I could use a rigid HTML table, or even a layout, but the datatables look so darn good and have the ability to sort/filter with ease.