From bd1a893a2eacc6b7b6496815ffe132f1be23b1f4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20Sko=C4=8D=C3=ADk?= Date: Fri, 19 Nov 2021 17:11:59 +0100 Subject: [PATCH] Prevent highilighting selected items, fix #59 --- src/components/Item.svelte | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/components/Item.svelte b/src/components/Item.svelte index 4071aa6..5be1fef 100644 --- a/src/components/Item.svelte +++ b/src/components/Item.svelte @@ -26,7 +26,10 @@ on:deselect on:hover > - {@html highlightSearch(item, isSelected, inputValue, formatter, disableHighlight)} + {@html (isSelected + ? `
${formatter(item, isSelected, inputValue)}
` + : highlightSearch(item, isSelected, inputValue, formatter, disableHighlight)) + } {#if isSelected && isMultiple}{/if} {/if}