Skip to content

colspan Support like spanning table #1499

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
rohangampa opened this issue Aug 30, 2020 · 5 comments
Open

colspan Support like spanning table #1499

rohangampa opened this issue Aug 30, 2020 · 5 comments

Comments

@rohangampa
Copy link

I wanted to recreate table structure similar to this
Screen Shot 2020-08-30 at 11 05 37 PM

I have tried customHeadRender and customBodyRender buts since i am able to customize individual cell but cannot group cells together i am not able to achieve the requirement.

please let me know if i am missing anything.

Thanks in Advance

@wdh2100
Copy link
Collaborator

wdh2100 commented Aug 31, 2020

@rohangampa

ref : #1441

@rohangampa
Copy link
Author

@wdh2100 i have gone through above referenced feature but i am not sure how grouping solves the issue .

@patorjk
Copy link
Collaborator

patorjk commented Aug 31, 2020

The only way I see of doing something like that is to have a column that takes in an array of data and then to use customBodyRender to render the data in the cell. The individual sub-cells would need to be divs rather than tds.

@rohangampa
Copy link
Author

Thanks @patorjk with this i will be able to achieve the table look ,but when download the table then it will display the cells as object rather than the customized cell .

@patorjk
Copy link
Collaborator

patorjk commented Sep 2, 2020

Check out the onDownload option. You can override how the data is put together. Example:

onDownload: (buildHead, buildBody, columns, data) => {
    return buildHead(columns) + buildBody(data); 
} 

One idea could be to copy the data object, and then process the data in the copy to display how you'd like, and then pass that data object to the buildBody function.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants