Skip to content
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

add 2d table support #1

Merged
merged 1 commit into from Feb 27, 2021
Merged

Conversation

Kolossi
Copy link

@Kolossi Kolossi commented Feb 24, 2021

Hi raftopyannis,

First, thanks for creating jsirontable, it was exactly the kind of library I was looking for in terms of table creation from json data.

But one thing I was after was the ability to create columns and rows from the data itself - a "2d" table.

I see there's been no commits to jsirontable (or any other activity on your github account) for 8 months, but I'm hoping you are still out there somewhere and get a notification of this PR.

Please accept a pull request to add 2d table capability. I've added an example to the example page which creates a table of the number of tracks each artist has at each unique BPM value (just something contrived to use the facilities with the existing data).

Hopefully you like it, I've tried to keep the implementation as similar to existing code as possible, resisted any urge to refactor the code in any way, and make the number of changes as small and self-contained as possible to ease PR. The changes should also mean that no existing functionality should be affected.

If you are generally supportive, I'd love to hear back and then I'll spend some more time testing, and implementing any suggestions you may have.

Regards

@yannisraft yannisraft merged commit deccbbe into yannisraft:master Feb 27, 2021
@yannisraft
Copy link
Owner

Hi Kolossi and i would really like to thank you for your kind contribution.

Your addition is a great feature to the library. I am also glad that you liked it. I just did some minor testing and it seams great. I will try to do some more testing in the next days.

In addition i would love to hear your suggestions on improving the library or any bugs you may have found. One problem that i haven't solved yet is the functionality of being able to resize the columns correctly. I have tried some tricks but i haven't found a working solution yet.

@Kolossi
Copy link
Author

Kolossi commented Mar 1, 2021

Hi raftopyannis,

Yay, glad you were pleased with it. :-)

Yeah I couldn't sort out the column widths - "Bruce ...(Springsteen)" is cut off in his prime in the header!

I thought I'd see first if you were happy before doing more.

So now I'll try to take a look soon at sorting that - I'm not a css expert but hopefully can muddle through - and also updating docs a bit.

My first thought was to (optionally) change to render as TD/TR but that's a cop-out by me really, and would surely break dragging. I'll take a look at doing it "properly".

If you want to save comms-by-pr, I'm happy to go email - send me at github@kolossi.co.uk.

All the best.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants