Closed JWThewes closed 8 months ago
Quick update:
I fixed the stuff you mentioned (Formatting and copy&past error).
I also added a first version of NestedKey support. Therefore I changed the generic of TableColumnType to
If you have any idea happy to see what you can do here...
I fixed the stuff you mentioned (Formatting and copy&past error). I also added a first version of NestedKey support. Therefore I changed the generic of TableColumnType to hope that is ok?
Thanks! Appreciate it. And yeah, it seems fine to me.
One last bit is missing. In my case rocket is optional on the data. It all works but inside the IDE you get an error for optional types. As of now I have no idea how to support optional types with NestedKeyOf.
hmmm, that's a good point. Let me check on my end and see if I can help with it.
I have tried to fix the thing, mostly around 3 parts:
engine
field to the story dataDatatableWrapper
generic type to also extends object
GetNestedKeys
utility typeLet me know if you have concerns about these updates @JWThewes, thanks! If not, then I think I can merge this and release it sometimes tomorrow my morning.
Looks good. Thanks for helping out! Looking forward to that release 👌
This PR has now been released: 🎉
Let me know if you have issues with the latest build. Thanks!
It's working so far. Only thing missing is sorting and filter support for nested properties. Totally forgot about these. Will have to take a look to make it working...
......that's a good point. I guess we need to expand the Storybook story a little bit and add tests for the sort/filter. Should be relatively straightforward, though, we can just replace row[prop]
with getProp(row, prop)
where getProp
is our .reduce()
thingy.
Just opened the PR https://github.com/imballinst/react-bs-datatable/pull/206 to add sorting and filtering support. Happy to get your feedback and see it merged and released :)
Add support for nested objects. This allows to access properties of nested objects via "." notation.