-
Notifications
You must be signed in to change notification settings - Fork 1k
Changed DataTable to use a primaryKey value as the row key #6742
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
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.
Looks good to me!
Something funky is happening in this storybook example. The location is showing up in the "Name" column |
I reproduced by interacting with the storybook example on Chrome. Seemed to only be an issue when interacting with DataTableColumns -> selecting/deselecting the Name column. |
The story issue was caused by the DataTableColumns Simple story not setting |
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.
Looks good!
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.
Looks good!
Thanks for doing this. Will there be a grommet release in the next couple of weeks that includes this fix? |
We should have a release coming roughly within ~1 week |
What does this PR do?
Changed DataTable to use a primaryKey value as the row key
Where should the reviewer start?
one line changed
What testing has been done on this PR?
unit tests
How should this be manually tested?
storybook?
Do Jest tests follow these best practices?
no change to test structure
Any background context you want to provide?
What are the relevant issues?
#6688
Screenshots (if appropriate)
Do the grommet docs need to be updated?
no
Should this PR be mentioned in the release notes?
yes
Is this change backwards compatible or is it a breaking change?
backwards compatible when using primaryKey
if the caller has no column.primary or primaryKey and the first value in the data objects is not unique, the browser will display a warning. This is expected given the inputs.