-
Couldn't load subscription status.
- Fork 12
fix: fixed lack of item id #135
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
Conversation
|
@Wagner3UB https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/entries |
Got it now: index is the index returned by map, not by entries. |
@mamico Yes, thank you for that. Corrected. |
|
@Wagner3UB Clear. But if I understand correctly, you are fixing only the columns, not the data. In the edge case you are testing, are the columns data ever empty? If so, it might be better to exclude those columns with an empty or null key, for example (please verify): |
|
@mamico I did the changes, the form now shows only the required columns and ignores the legacy ones. |
|
@pnicolli We need your approval and help to release it. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
OK
Summary
This PR fixes an issue where some table columns were missing an id key when generating column definitions dynamically from form data.
Context
The table component (based on TanStack Table, formerly known as React Table) requires every column to have a unique and non-falsy id in order to properly handle internal operations such as sorting, filtering, visibility, and rendering.
In some rare cases, the source data did not provide a valid key or identifier, causing runtime errors or rendering issues.
Without this fallback, the table configuration could break due to missing column identifiers, as id is a required field according to the TanStack Table documentation.
Reference: https://tanstack.com/table/latest/docs/guide/columns?utm_source=chatgpt.com#column-ids