'How to put expanded sub rows in one row in react-table (for a more compact view)?

I am using react-table from the TanStack. I try to get a more compact group by view.

My current code is exactly like the group by example from the TansStack Docs: https://codesandbox.io/s/github/tannerlinsley/react-table/tree/v7/examples/grouping

Is it possible to have the first entry of a sub group in the same row as the group?

So I want this table:

enter image description here

to look like this:

lh 2022 Mär PA  RB
                PA
                PA
            ING RB


Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source