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

Nested data fields #1742

Open
wants to merge 6 commits into
base: master
Choose a base branch
from
Open

Conversation

JcBernack
Copy link

Added the ability to access nested properties.

My solution uses lodash.get and set to read/write from the row object. The dataField property is used as the accessor, e.g. dataField='user.foo.bar[1]' will access row.foo.bar[1].

The only exception is the keyField which can not be a nested property.

@fengshuo
Copy link

fengshuo commented Nov 8, 2017

I was thinking about nesting property and found this pull request 👍
does this pr solve this case:

data=[
  {
     a: 50,
     someData: {
        dataA: 100,
        dataB: 100
     }
  }
]
and use it like this?
dataField='someData.dataA'

@JcBernack
Copy link
Author

Yes, exactly. I can not guarantee that it works in all cases though. If you check it out please let me know how it went.

@AllenFang
Copy link
Owner

Hey all, firstly thanks your contributions, actually, I'm already stop all new feature imeplement and start to move to react-bootstrap-table2 and we already support nested data but not released yet.

however, this PR is good but still missing some changes and it's not very easy to implement nested data in current code base, so I consider not to merge this PR and will encourage people to use react-bootstrapt-table2 in the future.

Let me know your any thinking or idea and very appreciated your contributions, thanks

@JcBernack JcBernack closed this Dec 11, 2017
@JcBernack JcBernack deleted the nested-data-fields branch December 11, 2017 20:41
@JcBernack JcBernack restored the nested-data-fields branch December 11, 2017 20:50
@JcBernack JcBernack reopened this Dec 11, 2017
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

3 participants