-
Notifications
You must be signed in to change notification settings - Fork 122
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
Using merged columns and rows in a table #93
Comments
Hey thanks for the suggestion. I've always wanted to implement such a feature. Will look into it. |
Hey @g3rzi... I was able to implement auto-merging cells vertically. The code is currently in the Merging cells horizontally is not supported yet - I'm yet to figure out how to implement it. |
I've figured out a way to possibly support horizontal cell merges, but this may need some deep changes to the Table rendering logic and may take a lot more time. I'm gonna merge #107 for now. Will work on the changes needed for horizontal cell merges, but a PR for that will appear at a later point of time. Will keep this issue open until then. |
Hey @g3rzi... after some trial and error, I'm afraid I won't be able to support horizontal cell merges as of now. With the way the code is structured currently, supporting horizontal merges would make the interfaces complicated and hard to understand. Here is a sample output from my testing code:
I'll address this at a later point of time if I can make some deep structural changes to the rendering logic. |
Hey @g3rzi I've supported both horizontal and vertical auto-merges. Please take a look at the latest release and the documentation @ https://github.com/jedib0t/go-pretty/blob/master/table/README.md#auto-merge |
@jedib0t this is great!! 😃 |
Hi,
first, you did an amazing work with this library, this is really great :).
I didn't find it in the examples, not sure if it possible but I wanted to check.
I want to create a table with merged columns and rows, like this one:
Is it possible?
In the header I am trying to create a column with merged column ("RCE") that is above two cells ("EXEC" and "RUN").
The second thing is to create separated lines from the "Container" column until the end because in each Pod I have number of containers and I want them to appear in separated rows.
This is how it looks when I tried to print it:
You can see the two issues I was talking about:
I wanted to merge all the one I marked.
Is it possible ?
This is the code for the printing I tried:
/disc /enhancement
The text was updated successfully, but these errors were encountered: