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

Sections support #721

Closed
wants to merge 2 commits into from
Closed

Conversation

kwent
Copy link

@kwent kwent commented Sep 21, 2016

Following those issues #460, #362.

I hacked the library to support a plain JS object ( with a deep of 1 ) in addition of an array resulting the table to cut sections (multiple tbody) for each keys.

Final result is:

screen shot 2016-09-21 at 4 21 45 pm

Data format is now:

const products = { categoryA: [ { id: 1, name: 'Item 1', price: 1000 },
                                { id: 2, name: 'Item 2', price: 2000 }
                               ],
                   categoryB: [ { id: 3, name: 'Item 3', price: 3000 },
                                { id: 4, name: 'Item 4', price: 4000 },
                                { id: 5, name: 'Item 5', price: 5000 }
                               ]
                 };

Demo file is here : https://github.com/kwent/react-bootstrap-table/blob/sections/examples/js/sections/demo.js

It's only tested with my use case. (Simple table with cell edit enable without breaking current features).

I don't think it's ready to merge but i think we should keep improve this PR to support all feature around a JS object. (checkbox untested, sort untested etc...)

@kwent kwent force-pushed the sections-without-lib branch 3 times, most recently from 525d761 to 9ca5de9 Compare September 22, 2016 02:45
@kwent kwent force-pushed the sections-without-lib branch from 9ca5de9 to 13dfedd Compare September 22, 2016 02:52
@AllenFang
Copy link
Owner

That's cool, I'll check this out :)

@kwent kwent force-pushed the sections-without-lib branch from 27c688c to 53f5f5b Compare October 17, 2016 18:00
@kwent kwent closed this May 10, 2018
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.

2 participants