You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[Due for payment 2025-06-27] [$250] DEV - Each child in a list should have a unique "key" prop when opening expense reports #63660
Version Number: Reproducible in staging?: Needs Reproduction Reproducible in production?: Needs Reproduction If this was caught during regression testing, add the test name, ID and link from TestRail: Email or phone of affected tester (no customers): Logs:https://stackoverflow.com/c/expensify/questions/4856 Expensify/Expensify Issue URL: Issue reported by:@dominictb Slack conversation (hyperlinked to channel name): #expensify_bugs
Action Performed:
Submit two expenses to a workspace
Open the expense report
Observe in console: Each child in a list should have a unique "key" prop error appears
Expected Result:
No error appears
Actual Result:
Console error: Each child in a list should have a unique "key" prop
Workaround:
Unknown
Platforms:
Select the officially supported platforms where the issue was reproduced:
Android: App
Android: mWeb Chrome
iOS: App
iOS: mWeb Safari
iOS: mWeb Chrome
Windows: Chrome
MacOS: Chrome
MacOS: Desktop
Platforms Tested:
On which of our officially supported platforms was this issue tested:
changed the title [-]DEV - Each child in a list should have a unique "key" prop when opening expense reports[/-][+]DEV - `Each child in a list should have a unique "key" prop` when opening expense reports[/+]on Jun 6, 2025
Please re-state the problem that we are trying to solve in this issue.
DEV - Each child in a list should have a unique "key" prop when opening expense reports
What is the root cause of that problem?
We don't add key prop on all item on columnComponenthere
What changes do you think we should make in order to solve the problem?
Add key prop using CONST.REPORT.TRANSACTION_LIST.COLUMNS values instead of CONST.SEARCH.TABLE_COLUMNS to all item on columnComponent, basically use the object key itself as the key prop for each <View>
The solution for this issue has been 🚀 deployed to production 🚀 in version 9.1.69-3 and is now subject to a 7-day regression period 📆. Here is the list of pull requests that resolve this issue:
@allgandalf / @dominictb@jliexpensify@allgandalf / @dominictb The PR fixing this issue has been merged! The following checklist (instructions) will need to be completed before the issue can be closed. Please copy/paste the BugZero Checklist from here into a new comment on this GH and complete it. If you have the K2 extension, you can simply click: [this button]
[Contributor] If the regression was CRITICAL (e.g. interrupts a core flow) A discussion in #expensify-open-source has been started about whether any other steps should be taken (e.g. updating the PR review checklist) in order to catch this type of bug sooner.
Link to discussion: N/A
[Contributor] If it was decided to create a regression test for the bug, please propose the regression test steps using the template below to ensure the same bug will not reach production again.
Activity
MelvinBot commentedon Jun 6, 2025
This has been labelled "Needs Reproduction". Follow the steps here: https://stackoverflowteams.com/c/expensify/questions/16989
melvin-bot commentedon Jun 6, 2025
Triggered auto assignment to @jliexpensify (
Bug), see https://stackoverflow.com/c/expensify/questions/14418 for more details. Please add this bug to a GH project, as outlined in the SO.izarutskaya commentedon Jun 6, 2025
From @dominictb
Proposal
Please re-state the problem that we are trying to solve in this issue.
Each child in a list should have a unique "key" prop.
What is the root cause of that problem?
In
TransactionItemRow, on larger screens (shouldUseNarrowLayoutisfalse), wemapall the columnsApp/src/components/TransactionItemRow/index.tsx
Line 354 in ebd7937
But all the
columnComponentsdoes not havekeypropApp/src/components/TransactionItemRow/index.tsx
Line 125 in ebd7937
According to react docs, JSX elements directly inside a
map()call always need keys. So the console error is shown.What changes do you think we should make in order to solve the problem?
We should pass a
keyprop to the column components. We can useCONST.SEARCH.TABLE_COLUMNSas keys. For example withtypecolumn:App/src/components/TransactionItemRow/index.tsx
Lines 127 to 135 in ebd7937
What specific scenarios should we cover in automated tests to prevent reintroducing this issue in the future?
None
What alternative solutions did you explore? (Optional)
None
allgandalf commentedon Jun 6, 2025
I can reproduce this bug by following the steps in the OP, please assign me here as a C+>
@jliexpensify please assign me as C+ as per this post: https://expensify.slack.com/archives/C02NK2DQWUX/p1749218091583829
[-]DEV - Each child in a list should have a unique "key" prop when opening expense reports[/-][+]DEV - `Each child in a list should have a unique "key" prop` when opening expense reports[/+]nyomanjyotisa commentedon Jun 6, 2025
Proposal
Please re-state the problem that we are trying to solve in this issue.
DEV - Each child in a list should have a unique "key" prop when opening expense reports
What is the root cause of that problem?
We don't add key prop on all item on
columnComponenthereWhat changes do you think we should make in order to solve the problem?
Add key prop using
CONST.REPORT.TRANSACTION_LIST.COLUMNSvalues instead ofCONST.SEARCH.TABLE_COLUMNSto all item oncolumnComponent, basically use the object key itself as the key prop for each<View>for example
What specific scenarios should we cover in automated tests to prevent reintroducing this issue in the future?
None
What alternative solutions did you explore? (Optional)
None
jliexpensify commentedon Jun 8, 2025
@allgandalf is this an
Externalissue or anInternalone?25 remaining items
melvin-bot commentedon Jun 20, 2025
Reviewinglabel has been removed, please complete the "BugZero Checklist".melvin-bot commentedon Jun 20, 2025
The solution for this issue has been 🚀 deployed to production 🚀 in version 9.1.69-3 and is now subject to a 7-day regression period 📆. Here is the list of pull requests that resolve this issue:
If no regressions arise, payment will be issued on 2025-06-27. 🎊
For reference, here are some details about the assignees on this issue:
melvin-bot commentedon Jun 20, 2025
@allgandalf / @dominictb @jliexpensify @allgandalf / @dominictb The PR fixing this issue has been merged! The following checklist (instructions) will need to be completed before the issue can be closed. Please copy/paste the BugZero Checklist from here into a new comment on this GH and complete it. If you have the K2 extension, you can simply click: [this button]
allgandalf commentedon Jun 25, 2025
BugZero Checklist:
Bug classification
Source of bug:
Where bug was reported:
Who reported the bug:
[Contributor] The offending PR has been commented on, pointing out the bug it caused and why, so the author and reviewers can learn from the mistake.
Link to comment: https://github.com/Expensify/App/pull/62286/files#r2165667317
[Contributor] If the regression was CRITICAL (e.g. interrupts a core flow) A discussion in #expensify-open-source has been started about whether any other steps should be taken (e.g. updating the PR review checklist) in order to catch this type of bug sooner.
Link to discussion: N/A
[Contributor] If it was decided to create a regression test for the bug, please propose the regression test steps using the template below to ensure the same bug will not reach production again.
N/A, This was a dev only bug
jliexpensify commentedon Jun 25, 2025
Payment Summary
https://www.upwork.com/jobs/~021931966855961744185
melvin-bot commentedon Jun 30, 2025
@jliexpensify Uh oh! This issue is overdue by 2 days. Don't forget to update your issues!
melvin-bot commentedon Jun 30, 2025
@jliexpensify Uh oh! This issue is overdue by 2 days. Don't forget to update your issues!
jliexpensify commentedon Jun 30, 2025
Paid and job closed!