imballinst / react-bs-datatable

Bootstrap datatable without jQuery. Features include: filter, sort, pagination, checkbox, and control customization.
https://imballinst.github.io/react-bs-datatable
MIT License
60 stars 20 forks source link

Implement column spanning #55

Open imballinst opened 4 years ago

imballinst commented 4 years ago

Yeah sir how to pass mulitple prop in headers array Eg, { title: "OWNER", prop: "name,mobile", sortable: true, filterable: true },
in attached file there is two lables Owner Name & Mobile i need to display in one td with lables, new_eg

Originally posted by @masnoonmulla in https://github.com/Imballinst/react-bs-datatable/issues/54#issuecomment-587386863

masnoonmulla commented 4 years ago

Hi @Imballinst

const new_array = arrayWithData( (values,index) => ( {...value,owner:NAME: ${value.name}, MOBILE: ${value.mobile} } ) )

header = [ { title: "OWNER", prop: "owner", sortable: true, filterable: true }, ]

it's worked for me...

imballinst commented 4 years ago

@masnoonmulla oooh! I see. I thought you wanted to do something like:

Owner
Name Mobile
Jack 123123
Jack 123123
Jack 123123

In that case, yes, your solution works.

masnoonmulla commented 4 years ago

@Imballinst you can implement that also for future.. Thank You so much for your help...