-
Notifications
You must be signed in to change notification settings - Fork 156
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
fix: list should have unique "key" in web application page #5502
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #5502 +/- ##
=======================================
Coverage 26.28% 26.29%
=======================================
Files 464 464
Lines 49624 49626 +2
=======================================
+ Hits 13043 13047 +4
+ Misses 35547 35546 -1
+ Partials 1034 1033 -1 ☔ View full report in Codecov by Sentry. |
72c046a
to
77a2f53
Compare
) : ( | ||
<> | ||
<Fragment key={v.version}> |
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.
[ASK]
v.version
is already used in L178. Is that OK?
(I'm sorry, but I'm not familiar with React)
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.
Thanks for asking,
Yes, @t-kikuc it is the same key for 1 record when map from recentlyDeployment.versionsList
.
The error show that we need uniq key for each child when map from recentlyDeployment.versionsList
so I use v.version as uniq key.
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.
@hongky-1994 Thank you! got 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.
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.
Thank @Warashi !
I update the pull with key ${v.name}:${v.version}
The key is just needs to be unique in a single cell, so the name and version of artifacts in a single row must be different, right?
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.
Thanks @hongky-1994 !
the name and version of artifacts in a single row must be different, right?
Yes, I think so. The combination of name and version is safe as a unique key in a single row.
Signed-off-by: kypham <[email protected]>
77a2f53
to
b1c1d1c
Compare
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.
LGTM
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.
👍
What this PR does:
Fix error log in console web
Why we need it:
Which issue(s) this PR fixes:
Does this PR introduce a user-facing change?:
No