Advertisement
Guest User

Untitled

a guest
Jun 25th, 2019
84
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.14 KB | None | 0 0
  1. <template>
  2. <template if:true={showItems}>
  3. <div class="slds-dropdown slds-dropdown_length-5 slds-dropdown_fluid" role="listbox">
  4. <ul class="slds-listbox slds-listbox_vertical" role="presentation">
  5. <template for:each={items} for:item="item">
  6. <li role="presentation" class="slds-listbox__item" key={item.value} onclick={handleSelect}> ***ON CLICK HERE****
  7. <div class="slds-media slds-listbox__option slds-listbox__option_plain slds-media_small" role="option">
  8. <span class="slds-media__figure slds-listbox__option-icon"></span>
  9. <span class="slds-media__body">
  10. <span class="slds-truncate" title={item.label}>{item.label}</span>
  11. </span>
  12. </div>
  13. </li>
  14. </template>
  15. </ul>
  16. </div>
  17. </template>
  18.  
  19. handleSelect(event){
  20. console.log('I have been clicked');
  21. //console.log(JSON.stringify(event));
  22. console.log(JSON.stringify(event.detail));
  23. console.log(JSON.stringify(event.source));
  24. console.log(JSON.stringify(event.target));
  25. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement