You need to sign in to do that
Don't have an account?
SFDC pv
I have a requirement to allow the user to multi select rows wherein i have kept dropdown fields, user will be selecting the values from the dropdown and the selected value needs to be stored in Salesforce
<aura:iteration items="{!v.freqFlyerList}" var="wrap" indexVar="idx">
<tr>
<th>
<label class="slds-checkbox">
<ui:inputCheckbox aura:id="checkFreqFlyer" value="" text="{!idx}" />
<span class="slds-checkbox--faux" />
<span class="slds-form-element__label"></span>
</label>
</th>
<th scope="row">
<div class="slds-truncate" title="{!wrap.key1}">{!wrap.key1}</div>
</th>
<td class="slds-truncate">
{!wrap.key2}
</td>
<td class="slds-truncate">
{!wrap.key3}
</td>
<td class="slds-truncate">
{!wrap.key4}
</td>
<td class="slds-truncate">
{!wrap.key5}
</td>
<td class="slds-truncate">
<lightning:select aura:id="ReqPicklist" onchange="{!c.ReqTypechange}">
<option value="">Please select</option>
<option value="val1">val1</option>
<option value="val2">val1</option>
<option value="val3">val1</option>
</lightning:select>
</td>
<td class="slds-truncate">
<lightning:select aura:id="UpgradeTierPicklist" onchange="{!c.UpgTierchange}">
<option value="">Please select</option>
<option value="val1">val1</option>
<option value="val2">val2</option>
<option value="val3">val3</option>
</lightning:select>
</td>
</tr>
</aura:iteration>
Onchange ctrlr:-
ReqTypechange : function(component, event, helper) {
var pickReqTypeval = component.find("RequestTypePicklist").get("v.value");
console.log('reqtypevalue-'+pickReqTypeval);
},
UpgTierchange : function(component, event, helper) {
var pickUpgTierval = component.find("UpgradeTierPicklist").get("v.value");
console.log('pickUpgTierval-'+pickUpgTierval);
},
This is working for only one rows if i have more than rows its not allowing me to select the values its throwing error " $ReqTypechange [component.find(...).get is not a function]"
<tr>
<th>
<label class="slds-checkbox">
<ui:inputCheckbox aura:id="checkFreqFlyer" value="" text="{!idx}" />
<span class="slds-checkbox--faux" />
<span class="slds-form-element__label"></span>
</label>
</th>
<th scope="row">
<div class="slds-truncate" title="{!wrap.key1}">{!wrap.key1}</div>
</th>
<td class="slds-truncate">
{!wrap.key2}
</td>
<td class="slds-truncate">
{!wrap.key3}
</td>
<td class="slds-truncate">
{!wrap.key4}
</td>
<td class="slds-truncate">
{!wrap.key5}
</td>
<td class="slds-truncate">
<lightning:select aura:id="ReqPicklist" onchange="{!c.ReqTypechange}">
<option value="">Please select</option>
<option value="val1">val1</option>
<option value="val2">val1</option>
<option value="val3">val1</option>
</lightning:select>
</td>
<td class="slds-truncate">
<lightning:select aura:id="UpgradeTierPicklist" onchange="{!c.UpgTierchange}">
<option value="">Please select</option>
<option value="val1">val1</option>
<option value="val2">val2</option>
<option value="val3">val3</option>
</lightning:select>
</td>
</tr>
</aura:iteration>
Onchange ctrlr:-
ReqTypechange : function(component, event, helper) {
var pickReqTypeval = component.find("RequestTypePicklist").get("v.value");
console.log('reqtypevalue-'+pickReqTypeval);
},
UpgTierchange : function(component, event, helper) {
var pickUpgTierval = component.find("UpgradeTierPicklist").get("v.value");
console.log('pickUpgTierval-'+pickUpgTierval);
},
This is working for only one rows if i have more than rows its not allowing me to select the values its throwing error " $ReqTypechange [component.find(...).get is not a function]"