ashl1 / datatables-rowsgroup

The Datatables feature plugin that groups rows (merge cells vertically) in according to specified columns.
Other
95 stars 94 forks source link

Broken table layout when using child rows #7

Closed Wirone closed 2 years ago

Wirone commented 8 years ago

At the beginning: thanks for plugin! I needed it and works well in general.

But I have problem with child rows. When child row is expanded for row with grouped cell, table's layout brokes.

I've created live demo.

It can be handled with more complex code for child rows' displaying/hiding, but maybe there's a possibility to support it in some way on this plugin's level.

ShiftyMcCool commented 7 years ago

I'm having this exact same issue. @Wirone you mentioned that it can be handled with more complex code. Have you worked out exactly how to do it or is it just speculation? If you have, mind sharing what you did? I can't seem to get it working correctly no matter how deep I dig.

Thanks!

Wirone commented 7 years ago

@ShiftyMcCool I have working code, this is live demo (I've updated previous demo and added custom behaviour in comparison to regular one).

What is done there:

Hope this helps :-)

ashl1 commented 7 years ago

Hello. Thanks for advice. There are several behaviors for the problem you mentioned. At least two.

  1. the child row will be shown at next line of line you clicked on
  2. the child row will be shown after all lines in group. This is more complicated because group might be separated in subgroups. They might be separated in another subgroups and so on. And if the table is big and and group is big you should think about auto scrolling to the child row.

What do you think about the UX of these behaviors? Why is the second method preferable to the first?

Wirone commented 2 years ago

Sorry @ashl1 for not answering your question and wasting your time 😅 I'll close it now as it's most probably outdated and I don't need it anymore.