hyojin / material-ui-datatables

An another React Data tables component.
MIT License
165 stars 58 forks source link

Problem in Key section. #48

Closed tandonrajiv closed 7 years ago

tandonrajiv commented 7 years ago

I am facing problem in key section.

const TABLE_COLUMNS = [
  {
    key: 'names',
  } 

Below is my Input data.

const TABLE_DATA = [
  {
    names:{
             name:"ABC"
    },
   names:{
             name:"XYZ"
    }  
}

Is it possible with Datatable?

hyojin commented 7 years ago

@tandonrajiv You can define your own render function for the columns. for example,

// column settings
{
  key: 'names',
  render: (names, all) => <p>{names.name}</p>,
}
hyojin commented 7 years ago

@tandonrajiv I close this issue but if you have any problem related this issue, pls let me know.