From 0a0afed84b904045088437177952818bde22c49d Mon Sep 17 00:00:00 2001 From: SteveSandersonMS Date: Thu, 18 Aug 2016 13:57:49 -0700 Subject: [PATCH] Add comment about why the 'actions' property is being patched on --- samples/react/ReactGrid/ReactApp/components/PeopleGrid.jsx | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/samples/react/ReactGrid/ReactApp/components/PeopleGrid.jsx b/samples/react/ReactGrid/ReactApp/components/PeopleGrid.jsx index e3cd3fc..6ce0ade 100644 --- a/samples/react/ReactGrid/ReactApp/components/PeopleGrid.jsx +++ b/samples/react/ReactGrid/ReactApp/components/PeopleGrid.jsx @@ -5,7 +5,9 @@ import { fakeData } from '../data/fakeData.js'; import { columnMeta } from '../data/columnMeta.jsx'; const resultsPerPage = 10; -const fakeDataWithAction = fakeData.map(data => Object.assign(data, {actions: ''})); +// Griddle requires each row to have a property matching each column, even if you're not displaying +// any data from the row in that column +fakeData.forEach(row => { row.actions = ''; }); export class PeopleGrid extends React.Component { render() { @@ -14,7 +16,7 @@ export class PeopleGrid extends React.Component {

People

- x.columnName)} columnMetadata={columnMeta} resultsPerPage={resultsPerPage}