-
Notifications
You must be signed in to change notification settings - Fork 776
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
custom data accessor #418
custom data accessor #418
Conversation
The tests are failing on an npm error I think between react-toastr which now requires react >= 15 and your component and / or react-dom |
@jdeniau, thanks your contribution :) I'll check this out in these day |
rebased the code on latest master added support for search updated example to show filtering and search
Is someone still working on this PR? Fixing conflicts? |
I'm not, I do not use this package anymore but feel free to update it Le 16 sept. 2016 15:15, "Mathieu Santo Stefano--Féron" <
|
@AllenFang I think you can closes this PR since this one (#508) is open. |
Closing in favor of #508 |
I created a custom data accessor. The purpose is the same as #50 but it provide a more flexible way of doing it.
You only need to pass a
dataAccess
parameter to theTableHeaderColumn
. The function takes the data as parameter and you can return whatever you want.This way, it fixes nested properties, but also if you use something like immutablejs it works fine.
I kept the
dataField
attribute as I saw you use it for a lot of purpose, but as it is not used for accessing data, it's more like an id I think.I make it work with simple filter, it does not work with
search
because you iterate over each object instead of each column here.Fixes #50