From e683c78b1eb52f84ac476b5d50a48616226d40b7 Mon Sep 17 00:00:00 2001 From: Valentin Perrelle <valentin.perrelle@cea.fr> Date: Fri, 3 May 2024 08:04:01 +0000 Subject: [PATCH] Apply 1 suggestion(s) to 1 file(s) --- ivette/src/dome/renderer/frame/toolbars.tsx | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/ivette/src/dome/renderer/frame/toolbars.tsx b/ivette/src/dome/renderer/frame/toolbars.tsx index 0604fca5300..5cde88b571d 100644 --- a/ivette/src/dome/renderer/frame/toolbars.tsx +++ b/ivette/src/dome/renderer/frame/toolbars.tsx @@ -383,8 +383,7 @@ function scrollToRef(r: null | HTMLLabelElement): void { function Suggestions(props: SuggestionsProps): JSX.Element { const { hints, onHint, index, onClose } = props; - const theHints = hints.length > 100 ? hints.slice(0, 100) : hints; - const suggestions = theHints.map((h, k) => { + const suggestions = hints.slice(0, 100).map((h, k) => { const selected = k === index || hints.length === 1; const classSelected = selected && 'dome-xToolBar-searchIndex'; const className = classes('dome-xToolBar-searchItem', classSelected); -- GitLab