Skip to content

Commit

Permalink
Prevent highilighting selected items, fix #59
Browse files Browse the repository at this point in the history
  • Loading branch information
mskocik committed Nov 19, 2021
1 parent 8105e35 commit bd1a893
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/components/Item.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,10 @@
on:deselect
on:hover
>
{@html highlightSearch(item, isSelected, inputValue, formatter, disableHighlight)}
{@html (isSelected
? `<div class="sv-item-content">${formatter(item, isSelected, inputValue)}</div>`
: highlightSearch(item, isSelected, inputValue, formatter, disableHighlight))
}
{#if isSelected && isMultiple}<ItemClose/>{/if}
</div>
{/if}
Expand Down

0 comments on commit bd1a893

Please sign in to comment.