-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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
Support nested columns feature #1889
base: master
Are you sure you want to change the base?
Conversation
@Siemienik sorry to bother you, but is there any updates on this? |
Thank you for your effort. Currently, I've no time. I'm going to see this in the first free-time slot. |
Wow, it is really great feature. I see that I have to analyze it deeply and the relations between nested columns and other features like borders, merged cells, styles etc. please don't blame me that It takes me a lot of time. |
Sure, no problem, take your time ) |
@Siemienik Just wondering about estimates, looking forward to switch to nested-columns released version and drop off ad-hoc solution :) |
This is awesome @jeka1985 Thank you |
How is the progress? |
This comment was marked as outdated.
This comment was marked as outdated.
@Siemienik any updates on this? This fixes 6-year old issue (#365) but still not merged |
const merges = flatter.getMerges(); | ||
const rows = flatter.getRows(); | ||
|
||
this.columns = flatter.getCoumns(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this.columns = flatter.getCoumns(); | |
this.columns = flatter.getColumns(); |
* | ||
* Filter off all cells with "children" property | ||
*/ | ||
getCoumns() { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
getCoumns() { | |
getColumns() { |
I'm aware of that. Everything I plan to merge must be thoroughly tested to prevent regressions, which is time-consuming. This is more of a volunteer effort for me, and even though I do my best, there are many other tasks to prioritize. By the way, all of you can help contribute to this project by:
If you're interested in the project's progress, you can check out: I would also like to suggest these discussions as candidates for inclusion in the next release: |
Summary
Thanks for a great lib!
Used it for generating styled dynamic reports and found generating dynamic nested headers pretty complicated because of low-level methods for adding rows and manual cell merging.
It would be great to have some declarative way for such tasks. Imho nested JSON tree looks like a solution.
In a nutshell, recursive walk the tree, collect items meta (such as cell size, including aggregated size of all children). Build flat list, use it for generating header rows and columns.
Test plan
Backward compatibility is not affected, added new worksheet method
makeColumns
for building flat columns from nested json treeAlso you can pass column props such as
width
adstyle
to "leaf" tree items.This input will be converted into 3 native entity groups
Related to source code (for typings update)