Our blazing fast Grid component built with pure JavaScript


Post by janan »

Hi,
We have problem as the data is not shown in grid after updating to 'version4.0.0'.
How can we define the column settings to get it work?

In the example https://www.bryntum.com/examples/grid/basic/ , change the data to

  data : [
{id:'id1', name: 'Linda', age: 30, food: 'pasta', color: 'red'},
{id:'id2', name: 'Marry', age: 36, city: 'Göteborg', food: 'pizza', color: 'red'},
{id:'id3', name: 'Peter', age: 50, city: 'Mälmö', food: 'pasta', color: 'red'},
{id:'id4', name: 'Lars', age: 70, city: 'stockholm', food: 'pasta', color: 'red'},
]

The city column is empty for all rows in 'version4.0.0' but it works in 'version3.1.8'
Please find attached the screenshot for both versions.
version3.1.8 is in left and version4.0.0 in the right side of the picture.
Image

Attachments
Screenshot 2020-10-29 at 10.04.09.png
Screenshot 2020-10-29 at 10.04.09.png (300.1 KiB) Viewed 484 times

Post by arcady »

If you don't define a model/store then list of fields will be auto-detected based on the very first provided record (it's described in the docs). And in the provided dataset you omit "city" field in the 1st record so the auto-generated model does not include "city" field.
Try adding the field to the 1st record and it'll start working as you expect.


Post Reply