Hello.
I am using Grid as Widget to show unpllanned tasks, and the data I'm providing to the grid are looking like this:
export iinterface GanttUnplannedTaskModel {
detail: MyModelOne;
main: MyModelTwo;
}
Creating Grid:
this.#instance = new Grid({
appendTo: this.elementRefToRender.nativeElement,
columns: [
{
text: 'Task number',
flex: 1,
field: 'detail.name',
sortable: true
},
And while clicking sort icon, nothing is happening.
I was wondering what I'm doing wrong. I searched many topics and doc, but I could not find a solution.
And then I tried to do this, before set data:
tasks.forEach(x => {
x['name'] = x.detail.name;
});
this.grid.data = tasks;
and then I changed field in column definition from 'detail.name' to 'name' and it was working.
It's a bug? Do I really need to redefine my models? Or is any workaround?
Greetings