Replies: 1 comment
-
I've found this same issue and you can use a custom function to get nested values from array as well. For example:
|
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
First, is there a Discord or something out there for discussing NextUI related things?
My issue here is related to bind of data to a table.
getKeyValue seems to be defined as:
declare const getKeyValue: (obj: any, key: Key) => any;
(Located in node_modules/@nextui-org/shared-utils/dist/object.d.ts.)
Where key is:
type Key = string | number;
The issue I have is when I map the data to the
component, any nested keys will not work. My code:Everything binds fine, until I get to columnKey = "users.display_name".
To work around this, I am simply flatting the item to include display_name at the top so the item looks like this:
The column definitions:
So the first column shows fine, second one ends up empty.
If anyone has a better recommendation then flattening the data, let me know.
Or maybe we can request an update to getKeyValue (or variant) keys to support nested keys.
Beta Was this translation helpful? Give feedback.
All reactions