Griddle icon indicating copy to clipboard operation
Griddle copied to clipboard

accessing rowData inside a customComponent in 1.0

Open lucidlemon opened this issue 9 years ago • 1 comments

How do we get the rowData again? I'm rendering the title of some data which links to the ID of the row. So earlier I could access the data of the whole row using data.rowData.id, this now doesnt seem to get passed. And I also can't just pass a object as data.

So stuff like..

{
  "id": 5,
  "title": "Awesome",
}

How do I access the ID inside the ColumnDefinition of title?

lucidlemon avatar Feb 27 '17 10:02 lucidlemon

Sorry you're bumping into this. The recommendation is to connect to Griddle's data store as we're doing here.

https://github.com/GriddleGriddle/Griddle/blob/master/stories/index.js#L67

We need to build this utility into Griddle as it seems pretty useful to folks. We also use redux internally but doesn't require consumers of Griddle to use Redux (outside of connecting to our state).

blkmutt avatar Feb 27 '17 15:02 blkmutt