-
-
Notifications
You must be signed in to change notification settings - Fork 290
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
Avoid spreading key
props in useTable
hook
#3476
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Fixes the following kinds of warnings on pages using `useTable`: Warning: A props object containing a "key" prop is being spread into JSX: let props = {key: someKey, role: ..., children: ...}; <td {...props} /> React keys must be passed directly to JSX without using spread: let props = {role: ..., children: ...}; <td key={someKey} {...props} /> I did check that react-table assigns its own keys in all of these cases on `/report/KaraokePlusInstrumentalRecordings`.
reosarevok
approved these changes
Feb 17, 2025
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, and it does seem to remove the annoying warnings. Thanks!
reosarevok
added a commit
that referenced
this pull request
Feb 18, 2025
* master: Update POT files using the production database Merge pull request #3472 from reosarevok/MBS-13929 Merge pull request #3477 from reosarevok/MBS-13939 Merge pull request #3478 from reosarevok/MBS-13938 Merge pull request #3473 from reosarevok/MBS-13930 Add ordering to `_find_authors_or_other_artists` roles Use proper query variable bindings in `Data::Edit::find_by_collection` MBS-13914: Validate vote arguments for voter edit search (#3464) MBS-13763: Add past year stats to the editors statistic page (#3465) MBS-13928: Use jaxsta.com instead of jaxsta.io (#3471) add --no-same-owner option to tar (#3456) MBS-13925: Instrument name erroneously displayed in link type autocomplete (#3467) Avoid spreading `key` props in `useTable` hook (#3476) More direct `get_authorship_relationship_gids` implementation Rename "misc_artists" to "other_artists" MBS-8328: Split the role filter for artist works MBS-13917: Rename work "writers" to "authors" Get authorship rel gids from the DB Rename "composition" to "authorship" Add test for loading different subsets of work artists Drop unneeded work artist credit test SQL MBS-8328: Add the non-writer artists back as own column MBS-8328: Limit work writers to writing rels MBS-11916: Report for recordings marked both karaoke and instrumental (#2504) Merge pull request #3468 from derat/feat_error MBS-13920 (II): Detect feat. artists in titles when seeding (#3469) Use `qq` to avoid escaping " MBS-6502: Surround catno search with quotes MBS-13922: Add URL cleanup and validation for Naver Vibe (#3463) Move most filter find_by to right Data file MBS-8500: Add "not by me" filter for collection edit lists MBS-13597: Add release filter to label index pages Avoid warning when selected_artist_credit_id is missing
reosarevok
added a commit
that referenced
this pull request
Feb 24, 2025
* beta: Translated using Weblate (Chinese (Simplified Han script)) Translated using Weblate (Italian) Update translation files MBS-13917: Add new properties to avoid crashes (#3481) Update POT files using the production database Merge pull request #3472 from reosarevok/MBS-13929 Merge pull request #3477 from reosarevok/MBS-13939 Merge pull request #3478 from reosarevok/MBS-13938 Merge pull request #3473 from reosarevok/MBS-13930 Add ordering to `_find_authors_or_other_artists` roles Use proper query variable bindings in `Data::Edit::find_by_collection` MBS-13914: Validate vote arguments for voter edit search (#3464) MBS-13763: Add past year stats to the editors statistic page (#3465) MBS-13928: Use jaxsta.com instead of jaxsta.io (#3471) add --no-same-owner option to tar (#3456) MBS-13925: Instrument name erroneously displayed in link type autocomplete (#3467) Avoid spreading `key` props in `useTable` hook (#3476) Translated using Weblate (Chinese (Simplified Han script)) Translated using Weblate (Chinese (Simplified Han script)) Translated using Weblate (Russian) Translated using Weblate (Chinese (Simplified Han script)) Translated using Weblate (Polish) Translated using Weblate (Italian) More direct `get_authorship_relationship_gids` implementation Rename "misc_artists" to "other_artists" MBS-8328: Split the role filter for artist works MBS-13917: Rename work "writers" to "authors" Get authorship rel gids from the DB Rename "composition" to "authorship" Add test for loading different subsets of work artists Drop unneeded work artist credit test SQL MBS-8328: Add the non-writer artists back as own column MBS-8328: Limit work writers to writing rels MBS-11916: Report for recordings marked both karaoke and instrumental (#2504) Merge pull request #3468 from derat/feat_error MBS-13920 (II): Detect feat. artists in titles when seeding (#3469) Use `qq` to avoid escaping " MBS-6502: Surround catno search with quotes MBS-13922: Add URL cleanup and validation for Naver Vibe (#3463) Move most filter find_by to right Data file MBS-8500: Add "not by me" filter for collection edit lists MBS-13597: Add release filter to label index pages Avoid warning when selected_artist_credit_id is missing
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Fixes the following kinds of warnings on pages using
useTable
:I did check that react-table assigns its own keys in all of these cases on
/report/KaraokePlusInstrumentalRecordings
.