I am trying to integrate a custom icon inside the grid component. As per the documentation, I have added it to the column list as a cell property, but the page is crashing and the grid is not rendering. Below is my code
id: "_treeToggle",
width: 30,
header: "toggle",
treetoggle: true,
cell:
<
NbIcon
id="tree-open"
iconKey={"chevron-right"}
// onClick={() => handleRowToggle(row.id)}
// className="svar-grid-tree-toggle"
/>
},...initialColumns]);
const initialColumns = [
{
id: 1,
city: "Amieshire",
country: 6,
email: "Leora13@yahoo.com",
firstName: "Ernest",
lastName: "Schuppe",
street: "Ratke Port",
zipCode: "17026-3154",
date: new Date("2016-09-23T07:57:40.195Z"),
companyName: "Lebsack - Nicolas",
stars: 820,
followers: 70,
newsletter: true,
checked: 1,
open: false,
data: [
{
id: "2.1",
city: "Amieshire",
country: 2,
email: "Brisa46@hotmail.com",
firstName: "Suzanne",
lastName: "Wolff",
street: "Lemuel Radial",
zipCode: "88870-3897",
date: new Date("2017-02-23T17:11:53.875Z"),
companyName: "Mayer - Considine",
stars: 852,
followers: 770,
newsletter: true,
checked: 1,
},
{
id: "2.2",
city: "Amieshire",
country: 2,
email: "Cody.Schultz56@gmail.com",
firstName: "Alessandra",
lastName: "Feeney",
street: "Mosciski Estate",
zipCode: "81514",
date: new Date("2016-06-30T05:23:18.734Z"),
companyName: "Nikolaus and Sons",
stars: 3209,
followers: 2780,
},
],
},
{
id: 3,
city: "Schumm",
country: 2,
email: "Mitchel.Herman@yahoo.com",
firstName: "Emiliano",
lastName: "Moore",
street: "Maria Junctions",
zipCode: "33930-7081",
date: new Date("2016-03-27T07:26:57.345Z"),
companyName: "Gulgowski - Botsford",
stars: 3820,
followers: 880,
open: false,
data: [
{
id: "3.1",
city: "Gihaven",
country: 2,
email: "Gaylord_Reichel16@yahoo.com",
firstName: "Alessandra",
lastName: "Smith",
street: "Kali Spurs",
zipCode: "01370",
date: new Date("2017-01-24T22:11:53.835Z"),
companyName: "Maggio LLC",
stars: 330,
followers: 590,
},
{
id: "3.2",
city: "Fechester",
country: 2,
email: "Eileen48@gmail.com",
firstName: "Eldridge",
lastName: "Bins",
street: "Casper Squares",
zipCode: "80025-1552",
date: new Date("2016-07-20T05:59:45.630Z"),
companyName: "Leffler, Cummerata and Price",
stars: 923,
followers: 704,
},
{
id: "3.3",
city: "Caleven",
country: 6,
email: "Rico_Nolan@hotmail.com",
firstName: "Claude",
lastName: "Hermiston",
street: "Bode Pine",
zipCode: "76773",
date: new Date("2017-03-13T08:02:41.211Z"),
companyName: "Heller, Rosenbaum and Lockman",
stars: 421,
followers: 403,
checked: true,
newsletter: true,
assigned: [2],
},
],
},
];```
Can anyone please help me out to resolve this issue?