Our blazing fast Grid component built with pure JavaScript


Post by striker »

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


Post by mats »

Sounds like you face this bug: https://github.com/bryntum/support/issues/3220

We'll see if it can be fixed easily.


Post by striker »

It looks exactly like my problem. Thanks, we'll wait. But for now we need to disable sorting functionality.


Post Reply