Griddle
Griddle copied to clipboard
Custom Grid Field not working
Hi, I tried to add custom field by following code.
var Link = React.createClass({
render: function(){
return <strong>Custom Value</strong>
}
});
var HeaderSection = React.createClass({
componentWillMount : function(){
user = UserStore.userList();
this.setState({userData:UserStore.userList()});
},
render : function(){
var columnMeta = [
{
'columnName': 'OrderNum',
'order': 3,
'locked': false,
'visible': true,
'customComponent': Link
}
];
return(
<div>
<Griddle results={this.state.userData} columnMetadata="columnMeta"
tableClassName="table-condensed" columns={["OrderNum", "#", "FirstName", "SecondName"]} />
</div>
);
}
});
module.exports = HeaderSection ;
In the above code, the name OrderNum is coming but under OrderNum header no values is displaying. Can you please give a suggestion ?
oh! It was my mistake. The issue related to JSON data in UserData from database table .
Hey @phpjagadeesh Glad you were able to figure it out! Please feel free to follow-up with anything else you encounter! :+1: