Advertisement
Guest User

Untitled

a guest
Jul 16th, 2019
70
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.26 KB | None | 0 0
  1. <table class="slds-table slds-no-row-hover slds-
  2. table_striped">
  3. <thead>
  4. <tr class="slds-text-title_caps">
  5. <th>
  6. </th>
  7. <th>
  8. <div class="slds-truncate" title="Column 1">Quote Id</div>
  9. </th>
  10. <th>
  11. <div class="slds-truncate" title="Column 1">View</div>
  12. </th>
  13. </tr>
  14. </thead>
  15. <tbody>
  16. <aura:iteration indexVar="index" items="{!v.listQuotes}" var="quote">
  17. <tr id="{!quote.Id}">
  18. <td>
  19. <lightning:input aura:id="chkbox" id="{!quote.Id}" type="checkbox" onchange="{!c.checkboxSelect}"/>
  20. </td>
  21. <td>
  22. <div id="{!index}" class="slds-text-title slds-text-color_default">{!quote.Name}</div>
  23. </td>
  24. <td>
  25. <lightning:button name="{!quote.Id}" variant="base" label="View" title="View" onclick="{!c.viewQuote}" />
  26. </td>
  27. </tr>
  28. </aura:iteration>
  29. </tbody>
  30. </table>
  31.  
  32. checkboxSelect : function(component, event, helper) {
  33. var quoteRecId = event.getSource().get("v.id");
  34. var checkValue = event.getSource().get("v.value");
  35.  
  36. console.log('Inside checkbox Select-->'+quoteRecId);
  37. console.log('Inside checkbox Select checkValue-->'+checkValue);
  38. var quotes = component.get("v.listQuotes");
  39. var resetChecks= [];
  40. for(var i=0; i<quotes.length; i++){
  41. if (quotes[i].Id !== quoteRecId) {
  42. component.find(quotes[i].Id).set("v.value", false);
  43. }
  44. }
  45.  
  46. }
  47.  
  48. Inside checkbox Select-->a0222000001ssxGAAQ
  49. EmployerViewQuotes.js:28 Inside checkbox Select checkValue-->
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement