-
Notifications
You must be signed in to change notification settings - Fork 754
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
Output table in table display all headers #1040
Comments
Hi @ciadch! Can you please provide an example. |
Maybe the problem is here : output_saveRows : ':not(.tablesorter-child):visible', But I don't see how to correct it :-) |
Yes, that selector is the problem. I set up this demo, which includes these changes: output_saveRows: 'v',
output_formatContent: function(config, widgetOptions, data) {
// remove Export link text
return data.content
.replace(/\s+/g, ' ')
.replace(/EXPORT\s(Parent|Child)/g, '');
}, It removes the export link text & also removes excessive white space, so the child row data ends up being displayed on one line. You can make the child table data show up in different rows if you change the format content function as follows (demo): return data.content
.replace(/\s{2,}/g, '\n')
.replace(/EXPORT\s(Parent|Child)/g, ''); Update: Apparently I can't spell "Parnet"... I've updated the demos above LOL |
Hi @Mottie Thanks for your demo. It looks better :-) ! But, what I want is to export only one "level" of table. When I click on EXPORT Parent, I only want parent table content (without child, without all under ".tablesorter-child") and when I click on EXPORT Child, I only want child. In your exemple, when I export the parent table, I have the child table content too. My question is, how to have only parent table content (for child it's ok, it works :-)) ! Thank you for your help ! |
You know what, it is actually a selector problem inside of the output widget. It targets all Thanks for your patience. |
Awesome ! Exactly what I want ! Big thank you for your help and your celerity :-) |
Hi Mottie,
I hope you're fine !
Today, I found a strange behaviour. When I try to output a second table in a child row (inside a tr). I always have strange behaviour with headers.
If I output the first table (parent), I have the values and header of parent but when I display child row (which contains a new table) and I try to output the parent table, I have the parent values and both parent and child headers. Same behavious If i output child table. I have correct values but both headers. I try to use output_headerRows but it works but sometimes I have the parent header, sometimes the child header.
Any idea or suggestion ?
Thank you
The text was updated successfully, but these errors were encountered: