Skip to content

Instantly share code, notes, and snippets.

@saumitra2810
Last active May 30, 2018 05:21
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save saumitra2810/330d075b21b5be0d845a36ad5d64a970 to your computer and use it in GitHub Desktop.
Save saumitra2810/330d075b21b5be0d845a36ad5d64a970 to your computer and use it in GitHub Desktop.
var renderFunctions = [
function(item, rowIndex, offset){return offset + rowIndex + 1;},
function(item){
return <a target="_blank" href={item.a}>{item.b}</a>
},
function(item){return item.c}
];
var tableHeaders = ["S.No", "Header 1", "Header 2"];
var items = [{a: "X", b: "Y", c: "Z"}];
<GeneralisedTable
noDataPlaceholderText="No data found"
doPagination={false}
tableData={items}
attributeRenderFunctions={renderFunctions}
tableHeaders={tableHeaders}
/>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment