Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <template>
- <template if:true={showItems}>
- <div class="slds-dropdown slds-dropdown_length-5 slds-dropdown_fluid" role="listbox">
- <ul class="slds-listbox slds-listbox_vertical" role="presentation">
- <template for:each={items} for:item="item">
- <li role="presentation" class="slds-listbox__item" key={item.value} onclick={handleSelect}> ***ON CLICK HERE****
- <div class="slds-media slds-listbox__option slds-listbox__option_plain slds-media_small" role="option">
- <span class="slds-media__figure slds-listbox__option-icon"></span>
- <span class="slds-media__body">
- <span class="slds-truncate" title={item.label}>{item.label}</span>
- </span>
- </div>
- </li>
- </template>
- </ul>
- </div>
- </template>
- handleSelect(event){
- console.log('I have been clicked');
- //console.log(JSON.stringify(event));
- console.log(JSON.stringify(event.detail));
- console.log(JSON.stringify(event.source));
- console.log(JSON.stringify(event.target));
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement