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

JsonView.KeyName invalid path to root in keys #61

Closed
sebastiaan-dev opened this issue Oct 23, 2024 · 2 comments
Closed

JsonView.KeyName invalid path to root in keys #61

sebastiaan-dev opened this issue Oct 23, 2024 · 2 comments

Comments

@sebastiaan-dev
Copy link

sebastiaan-dev commented Oct 23, 2024

I am using the keys prop to locate the current item during selection. For this to work I need the path from the root to the selected item. However, whenever I select something of NestedOpen type it only gives the current key as the path.

At first I thought to add the keys prop as below in NestedOpen.tsx:51:

<KayName keyName={keyName} keys={keys} />

But this still gave only a single key. It seems it finds the full path when rendering for the first time, but forgets on subsequent renders. Hope you can help!

Best Regards

jaywcjlove added a commit that referenced this issue Oct 23, 2024
@jaywcjlove
Copy link
Member

{(keyName || typeof keyName === 'number') && <KayName {...compProps} />}

@sebastiaan-dev It seems that I have fixed this issue. Please confirm.

github-actions bot pushed a commit that referenced this issue Oct 23, 2024
@sebastiaan-dev
Copy link
Author

Yes it works! Thank you for the quick fix!

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

No branches or pull requests

2 participants