Our blazing fast Grid component built with pure JavaScript


Post by henrique »

I'm having a problem with editing on the grid when json has objects inside objects.

I put an example below, with two columns, the first with the composite field and the second with a simple field. In the first if you try to edit the editor is empty, already in the second the value appears in the editor and changes the linked column, which does not happen with the first column.

Am I doing something wrong or is this a problem?

import { Grid } from '../../build/grid.module.js';

new Grid({
  appendTo : 'container',
  columns :[
    {text: 'A field', field: 'object.name'},
    {text: 'Another field', field: 'name'}
  ],
  data: [
{name: 'Name here',
object: {name: 'another name'}
}
]
});

Post by Animal »

Since the base Grid class is able to extract the data this way, the CellEditing feature should probably match that.

For now, you will have to define a field with a dataSource that uses that mapping, and use that field name in the column definition.

https://www.bryntum.com/docs/grid/api/Core/data/Model#property-fields-static


Post by Animal »

Here is a ticket for you to track: https://github.com/bryntum/support/issues/3611


Post by henrique »

Thanks, I will wait for the fix!


Post Reply