Griddle icon indicating copy to clipboard operation
Griddle copied to clipboard

Custom Grid Field not working

Open prnl-jagadeesh opened this issue 11 years ago • 2 comments

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 ?

prnl-jagadeesh avatar Feb 06 '15 06:02 prnl-jagadeesh

oh! It was my mistake. The issue related to JSON data in UserData from database table .

prnl-jagadeesh avatar Feb 06 '15 06:02 prnl-jagadeesh

Hey @phpjagadeesh Glad you were able to figure it out! Please feel free to follow-up with anything else you encounter! :+1:

ryanlanciaux avatar Feb 06 '15 20:02 ryanlanciaux