Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <table class="slds-table slds-no-row-hover slds-
- table_striped">
- <thead>
- <tr class="slds-text-title_caps">
- <th>
- </th>
- <th>
- <div class="slds-truncate" title="Column 1">Quote Id</div>
- </th>
- <th>
- <div class="slds-truncate" title="Column 1">View</div>
- </th>
- </tr>
- </thead>
- <tbody>
- <aura:iteration indexVar="index" items="{!v.listQuotes}" var="quote">
- <tr id="{!quote.Id}">
- <td>
- <lightning:input aura:id="chkbox" id="{!quote.Id}" type="checkbox" onchange="{!c.checkboxSelect}"/>
- </td>
- <td>
- <div id="{!index}" class="slds-text-title slds-text-color_default">{!quote.Name}</div>
- </td>
- <td>
- <lightning:button name="{!quote.Id}" variant="base" label="View" title="View" onclick="{!c.viewQuote}" />
- </td>
- </tr>
- </aura:iteration>
- </tbody>
- </table>
- checkboxSelect : function(component, event, helper) {
- var quoteRecId = event.getSource().get("v.id");
- var checkValue = event.getSource().get("v.value");
- console.log('Inside checkbox Select-->'+quoteRecId);
- console.log('Inside checkbox Select checkValue-->'+checkValue);
- var quotes = component.get("v.listQuotes");
- var resetChecks= [];
- for(var i=0; i<quotes.length; i++){
- if (quotes[i].Id !== quoteRecId) {
- component.find(quotes[i].Id).set("v.value", false);
- }
- }
- }
- Inside checkbox Select-->a0222000001ssxGAAQ
- EmployerViewQuotes.js:28 Inside checkbox Select checkValue-->
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement