From bd7058961ea735563ee45af8b9a42ed0cc88c22c Mon Sep 17 00:00:00 2001 From: Denis Papec Date: Thu, 5 Oct 2023 19:52:07 +0100 Subject: [PATCH] Fix: Quicklaunch duplicating services in the list Signed-off-by: Denis Papec --- src/components/quicklaunch.jsx | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/components/quicklaunch.jsx b/src/components/quicklaunch.jsx index 0304f038e37..642af3af1d4 100644 --- a/src/components/quicklaunch.jsx +++ b/src/components/quicklaunch.jsx @@ -152,6 +152,11 @@ export default function QuickLaunch({servicesAndBookmarks, searchString, setSear return {parts.map((part, i) => part.toLowerCase() === searchString.toLowerCase() ? {part} : part)}; } + function getRandomKeyId() { + // as these are dynamically generated elements, we can generate random keys + return Math.floor(Math.random() * 100000); + } + return (
- {results.length > 0 &&
    + {results.length > 0 &&
      {results.map((r, i) => (