Fix: unique element key generation in quicklaunch and services (#2586)

pull/2604/head
shamoon 12 months ago committed by GitHub
parent 1c47d9d70e
commit 50c989e36a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -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}

@ -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}

Loading…
Cancel
Save