Skip to content

Commit

Permalink
Fix: unique element key generation in quicklaunch and services (#2586)
Browse files Browse the repository at this point in the history
  • Loading branch information
shamoon authored Jan 6, 2024
1 parent 1c47d9d commit 50c989e
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/components/quicklaunch.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -199,7 +199,7 @@ export default function QuickLaunch({
{results.length > 0 && (
<ul className="max-h-[60vh] overflow-y-auto m-2">
{results.map((r, i) => (
<li key={r.container ?? r.app ?? `${r.name}-${r.href}`}>
<li key={[r.name, r.container, r.app, r.href].filter((s) => s).join("-")}>
<button
type="button"
data-index={i}
Expand Down
2 changes: 1 addition & 1 deletion src/components/services/list.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ export default function List({ group, services, layout, useEqualHeights }) {
>
{services.map((service) => (
<Item
key={service.container ?? service.app ?? service.name}
key={[service.container, service.app, service.name].filter((s) => s).join("-")}
service={service}
group={group}
useEqualHeights={layout?.useEqualHeights ?? useEqualHeights}
Expand Down

0 comments on commit 50c989e

Please sign in to comment.