mirror of
https://github.com/aspnet/JavaScriptServices.git
synced 2025-12-22 17:47:53 +00:00
Add comment about why the 'actions' property is being patched on
This commit is contained in:
@@ -5,7 +5,9 @@ import { fakeData } from '../data/fakeData.js';
|
|||||||
import { columnMeta } from '../data/columnMeta.jsx';
|
import { columnMeta } from '../data/columnMeta.jsx';
|
||||||
const resultsPerPage = 10;
|
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 {
|
export class PeopleGrid extends React.Component {
|
||||||
render() {
|
render() {
|
||||||
@@ -14,7 +16,7 @@ export class PeopleGrid extends React.Component {
|
|||||||
<div>
|
<div>
|
||||||
<h1>People</h1>
|
<h1>People</h1>
|
||||||
<div id="table-area">
|
<div id="table-area">
|
||||||
<Griddle results={fakeDataWithAction}
|
<Griddle results={fakeData}
|
||||||
columns={columnMeta.map(x => x.columnName)}
|
columns={columnMeta.map(x => x.columnName)}
|
||||||
columnMetadata={columnMeta}
|
columnMetadata={columnMeta}
|
||||||
resultsPerPage={resultsPerPage}
|
resultsPerPage={resultsPerPage}
|
||||||
|
|||||||
Reference in New Issue
Block a user