This is a migrated thread and some comments may be shown as answers.

GridColumn isn't being interpreted

2 Answers 69 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Ray
Top achievements
Rank 1
Ray asked on 23 Aug 2018, 09:58 PM

Hi,

I'm trying to implement a grid table using data which is an array of objects. Currently, my code looks something like this:

 

let data = [
      {
          test: "test",
          dog: "dog",

          cat: "asld"
      },
      {
          test: "afljsdojf",
          dog: "cat",

          cat: "sadfasdf"
      }
    ];

<Grid data={data} >
       <GridColumn field="test" title="Test" />
       <GridColumn field="dog" title="Dog!"/>
</Grid>

When it renders, by my interpretation it should show a table with two columns, with headers "Test" and "Dog!". Instead it shows a table with headers "test", "dog", and "cat", so essentially it's ignoring the <GridColumn> tags. 

Any advice would be appreciated!

 

2 Answers, 1 is accepted

Sort by
0
Ray
Top achievements
Rank 1
answered on 23 Aug 2018, 10:44 PM
Nevermind, it has to do with React Hot Loader. For future reference: you have to cold(GridColumn) for it to work.
0
Stefan
Telerik team
answered on 24 Aug 2018, 10:11 AM
Hello, Ray, 

Thank you for the clarification and for sharing this with the community, it is highly appreciated.

This is indeed the reason why this issue occurs.

This is the cold method article which has to be used in order to not wrapper the Kendo UI components:

https://github.com/gaearon/react-hot-loader#disabling-a-type-change-%EF%B8%8F

Regards,
Stefan
Progress Telerik
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
Tags
General Discussions
Asked by
Ray
Top achievements
Rank 1
Answers by
Ray
Top achievements
Rank 1
Stefan
Telerik team
Share this question
or