Created
March 23, 2022 12:33
-
-
Save svierk/f1140ca5d78bbc23b1da79606388a1f3 to your computer and use it in GitHub Desktop.
HTML template for LWC that represents an item within the multi select combobox parent component
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<template> | |
<li | |
role="presentation" | |
key={item.key} | |
class={itemClass} | |
data-id={item.key} | |
data-name={item.value} | |
onclick={handleClick} | |
> | |
<div class="slds-media slds-listbox__option slds-listbox__option_plain slds-media_small" role="option"> | |
<span class="slds-media__figure"> | |
<lightning-icon | |
icon-name="utility:check" | |
size="x-small" | |
alternative-text="Selected" | |
class="slds-icon slds-icon--selected slds-icon--x-small slds-icon-text-default slds-m-right--x-small" | |
> | |
</lightning-icon> | |
</span> | |
<span class="slds-media__body"> | |
<span class="slds-truncate" title={item.value}>{item.label}</span> | |
</span> | |
</div> | |
</li> | |
</template> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment