Questions tagged [aura-iteration]

questions regarding the aura:iteration component. This coomponent iterates over a collection of items and renders the body of the tag for each item.

Filter by
Sorted by
Tagged with
0 votes
0 answers
25 views

From Apex server data is not coming to Aura components

apex wrapper : public with sharing class DemoWrapper { public class Timesheet{ @AuraEnabled public String employeeId {get;set;} @AuraEnabled public String employeeName {get;set;} ...
user avatar
-1 votes
1 answer
25 views

How to iterate List<Map<String, Object>> in aura component

I want to iterate over List<Map<String, Object>>. I'm not sure how to do it. Below is the response I am getting from apex class to aura controller. [{"label":"Test 1",&...
user avatar
  • 25
0 votes
1 answer
23 views

How to pass lightning:outputField value which is used in recordViewForm

I want to pass my lightning:outputField value to aura controller on hover the field. I'm not able to find a way to do it. Below is the code. <aura:iteration items="{!v.completeList}" var=&...
user avatar
  • 25
0 votes
1 answer
37 views

For loop with in another for loop in aura javascript causes performance issue how to overcome on this issue

Here is the code snippet where my filterList is original list contains 300 records data and newList contains the selected list values which an 165 as example as below for loop causes an performance ...
user avatar
  • 1
0 votes
1 answer
130 views

Implement lazy loading on table using aura component

I'm trying to implement the lazy loading to the aura component and Accounts record maybe 10 or 100 or 500 and I do not have the ability to play with soql since this component sits as a child and the ...
user avatar
  • 6,614
0 votes
0 answers
45 views

On click button how to refresh the specific Child Lightning component

I have parent component in parent component called child component in aura iteration. Based on the data in the list of the parent component number of child component getting created and in child ...
user avatar
  • 13
0 votes
1 answer
78 views

Can't get element id inside aura iteration

I need to create a component like this from the image. An accordion with several sections and inside each section some radio buttons. So, if the user chooses the Other option then he will have to ...
user avatar
0 votes
1 answer
80 views

Up , Down keyboard interaction not working in custom picklist aura component

<div class="slds-combobox slds-dropdown-trigger slds-dropdown-trigger_click slds-is-open" aura:id="resultsDiv" aria-expanded="true" aria-haspopup="listbox" ...
user avatar
0 votes
2 answers
61 views

Lightning input not able to render inside iteration

I am trying to iterate a custom metadata to create input fields in the lightning layout item, however it is not rendering as expected, not sure what I am doing wrong. Here is my code: <!-- ...
user avatar
  • 497
0 votes
1 answer
61 views

Adding values together in a formattedNumber Aura component

I have two numeric values that I want to add together and be outputted by a lightning:formattedNumber component. I can give pass either value individually to the component and it renders, but not when ...
user avatar
0 votes
1 answer
100 views

Use id in aura:iteration for recordEditForm

I have aura:iteration which goes through my custom wrapper class (which contains List of sObjects), and show recordEditFrom for all of them. My wrapper does not have an Id field. However, it has a key ...
user avatar
0 votes
1 answer
672 views

How to set lightning input value using index in aura iteration when button is pressed

I want to set the incremented value to lightning input when a button is pressed. In aura iteration n number of record when I click on a button it is copying the value to all lightning input. But in my ...
user avatar
0 votes
1 answer
18 views

Display one item (taken from a list created by aura:Iteration) within an alert() [duplicate]

I have a list of cases and a related button for each case. Once I hit the button, I want to see an alert with all the details of the case. I've tried multiple solution but i can't reference the x ...
user avatar
1 vote
1 answer
65 views

Component.find returns elements not on page

I have an array of sections, which are objects that each contain an array of fields. If I reset this array and then look for the fields using component.find(), it returns many more fields than display ...
user avatar
  • 15
0 votes
1 answer
80 views

Initially default selected value returns null during button click in aura component

I made Temp Reservation as default selected option. Initially when i click save button it returns null instead of Temp Reservation. once i change the option it returns the selected value. Anyone helps ...
user avatar
0 votes
1 answer
916 views

Get field value of current record in Aura component

I have an auro component where I created an input field and I want its value to come from the AccountID field. The component is placed on related object detail page. <aura:component controller=&...
user avatar
  • 21
1 vote
1 answer
330 views

comparing two attribute value in component

I have loop in which i want to compare rec.id with arrtribute SummaryId1 which is integer.when i use == operator like that <aura:if isTrue="{!v.summaryId1 == !recc.id}"> then ...
user avatar
0 votes
1 answer
35 views

ECMA 5 Map, Sets, List Vs ECMA 6 Map, Sets, List - > Aura

Questions: Does ECMA 5 supports Map & Set & List collections? Preferred approach to define and iterate Map and Set in Aura? - I think we have to use objects for Maps like: <aura:attribute ...
user avatar
1 vote
1 answer
640 views

Iterate over two lists in Aura component to display active number of steps

I am building an aura lightning component that displays a timeline. I have two lists, one that returns all the steps in the timeline, and the second list that returns the current active number of ...
user avatar
  • 2,327
0 votes
0 answers
381 views

Preselect Rows In Lightning Datatable (Aura lightning Component)

I am developing an aura lightning component which is "called" through a visualforce page. The functionality consists of two aura lightning components: Parent aura lightning component: ...
user avatar
0 votes
1 answer
37 views

Display number in table where there are two iterations

I am trying to display numbers in a table where there are two iterations. but if I use indexVar attribute the numbers are not displaying in sequence. Is there any solution to it? Is there any other ...
user avatar
0 votes
2 answers
1k views

How can I set focus on a lightning:input, generated inside a aura:iteration, from controller method triggered by another element's event?

I have an Aura component with an aura:iteration that each iteration generates a lightning:formattedNumber, a hidden lightning:input (both for the same field), and a lightning:buttonIcon that calls a ...
user avatar
0 votes
1 answer
22 views

Problem with aura and JS controller

I have a little problem. I have a simple program that gets a value from picklist , and using this value my program must show all values from the database Thats my code COMPONENT <aura:attribute ...
user avatar
  • 13
0 votes
0 answers
43 views

Metadata.Layout is NULL in aura component

I have to pull the Metadata.Layout of an object from apex and basically re-create page layouts in aura. My plan was to use the Metadata.Layout and just iterate over the sections/columns/fields. In ...
user avatar
0 votes
0 answers
92 views

Aura:If results in label - field not value

When using aura:if, I can't get the value of the field to show. Unless I'm using lighting:outputfield the result is the field label. Is there something else I should do to ensure the value is produced ...
user avatar
  • 377
0 votes
1 answer
399 views

Dynamically calculate values in Aura Iteration

I've aura iteration in my Aura Component where I have a start date and End date and I want to calculate the difference between Start and End date for each row in Aura iteration. What options I have ...
user avatar
  • 321
0 votes
1 answer
145 views

Lightning Component Aura Iteration Show/Hide

I am trying to implement inline-search in the HTML table inside my aura lightning component. As the table is dynamically rendered using aura iteration, each row has a dynamic aura id, and hence I am ...
user avatar
0 votes
1 answer
154 views

How to reproduce a dynamic selection list from a custom object in lightning component

I have a @AuraEnabled method from which I pass a custom object list to a lighting component on which I want to iterate. The custom object will have a dynamic map from which I want to create a dynamic ...
user avatar
  • 2,090
0 votes
1 answer
107 views

How to sort fields of an object related to another object

Sorting fields directly from an object works, but how to sort fields from a related object? How do you access the Description__c field so that you can sort the records? Controller @AuraEnabled public ...
user avatar
0 votes
0 answers
935 views

Iteration in LWC not working for 2nd element of input array

I am working in LWC requirements where I have a list of records using this list I need to create inputs text. Once I loop through the list in LWC 'HTML component' my input texts are coming as aspected ...
user avatar
  • 634
1 vote
1 answer
4k views

LWC create input fields under LWC iteration

I am new to LWC. I have to create multiple input fields for different rows. Let say, I have selected 3 records from the previous page and for all those 3 records I need to create the input field and ...
user avatar
  • 634
1 vote
1 answer
733 views

Get Row Id for a Lightning:ButtonIcon

I am adding a buttonIcon for each aura:iteration record in my interface. I need to get the Id of the row that the button is on. Here is my component code: <aura:iteration items="{!v....
user avatar
-1 votes
1 answer
30 views

I want to iterate over my Account[]

so there is an Account[] which has Accounts and their related contacts. Can i get contacts details like this?: if not then how can i access contacts details, without adding one more aura iteration tag ...
user avatar
0 votes
1 answer
50 views

Seems there is something wrong with my <aura:iteration> as Same Account record is displayed twice in my slds table

<table class="slds-table slds-table--bordered slds-table--cell-buffer" style="margin-top:50px;"> <thead> <tr class="slds-text-heading--label"> <...
user avatar
0 votes
1 answer
282 views

Selection done in one iteration in aura, is reflecting in every other iteration

I have a scenario where I am calling a custom lookup lwc component inside my aura iteration. The issue is the value I am selecting in the custom lookup in one iteration is being reflected in all the ...
user avatar
1 vote
1 answer
355 views

<aura:if not working but <aura:renderif does - any reason why that you guys can see?

so the scenario is that i have an iteration within an iteration .... <aura:handler name="init" value="{!this}" action="{!c.setUpScreen}" /> <aura:attribute name="PageQuestions" type=...
user avatar
0 votes
1 answer
226 views

How to change the value of ui:outputText in second div onchange inputfiled in aura iteration in one div

I have below an aura component and a controller function, I want to change the value of ui:outputText on change order Price of lightning:input. Now getting the current input box value in the ...
user avatar
  • 145
1 vote
1 answer
1k views

Radio Button within Iteration - When user selects radiobutton, store the associated sourceId in attribute 'accountId'

Currently, I'm iterating through a wrapper that includes sourceId (aka accountId) and Opportunity Name, etc. When the user selects a radio button, I want to capture that sourceId in an attribute at ...
user avatar
1 vote
1 answer
35 views

aura:interation Field Order

I'm developing a component to add multiple items (in this example debts). When a new debt is added I need the fields to display like so: At the moment the fields display like this: Here is my ...
user avatar
  • 13
0 votes
1 answer
841 views

how to remove "Added non-passive event listener to a scroll-blocking <some> event." warning?

I am using lightning record form inside aura iteration like this which is visible on hover <aura:Iteration items="{!v.Accountscurrent}" var="acc" indexVar="index"> <span class=" icon slds-...
user avatar
  • 2,814
1 vote
1 answer
389 views

Display table with data from two sources - array and map - Aura Components

I have related objects with a one-to-many relationship. For example: Owner1 ---> Thing1 Owner1 ---> thing2 Owner2 ---> Thing3 I want to display data from these objects in a table ...
user avatar
  • 888
0 votes
1 answer
127 views

<aura:iteration> Display unique value

I have an iteration like this; <aura:iteration items="{! xy.typeList }" var="sp" indexVar="x" > <aura:If isTrue="{!sp.desc}"> {! sp.desc } {! ( greaterthan(subtract(pq.type2....
user avatar
1 vote
1 answer
3k views

Aura Components Specialist: Step 3: Completed but tiles do not display data?

I've just completed step 3 of the Aura Components Specialist superbadge however the tiles for the boat search results just display an empty block on the page. Not sure why this is happening. I've ...
user avatar
  • 295
0 votes
1 answer
266 views

Dynamic expression in nested aura iteration in Salesforce Lightning

I've two objects: listContent: [{'Id':1,'Name':'SF'},{'Id':2,'Name':'DS'}] fields:['Id','Name'] Now I'm using nested aura iteration to display the listContent as shown below: <aura:iteration ...
user avatar
0 votes
0 answers
767 views

Nested Rows inside table with shared headers - Aura Iteration

I'm trying to create a table with nested rows based on nested array data set with following structure: [ 'key1' : [ 'subKey1' : 'subValue1', 'subKey2' : 'subValue2', ...
user avatar
  • 1
0 votes
1 answer
307 views

how to copy values to field in aura:iteration dynamically using Radio button with multiple rows

Here I'm trying to copy values from the output text table data to respect of their field which are price and Qty Please take look at the below picture for an idea. Here I'm using Inside two aura: ...
user avatar
  • 33
0 votes
1 answer
989 views

Setting different checkboxes in aura:iteration - Dynamic binding does not work in Lightning

I need to be able to call different checkboxes in an aura:iteration: <aura:attribute name="orders" type="Order[]"/> <aura:handler name="init" value="{!this}" action="{!c.doInit}" /&...
user avatar
0 votes
1 answer
1k views

How to show sub query count in aura iteration

I would like to show contacts count for each account in auta iterataion how to show sub query count in aura iteration? Component code: <aura:component controller="accWithContController"> &...
user avatar
0 votes
1 answer
530 views

How to save single record using Lightning:recordEditform inside aura:iteration? I am able to save all the records by using forEach in JS Controller

Component: <aura:iteration items="{!v.oppStageList}" var="opp"><lightning:recordEditForm aura:id = "StageChange" recordId ="{!opp.Id}" objectApiName ="Opportunity" onsuccess ="{!c....
user avatar
1 vote
2 answers
1k views

how to filter the collection used in aura:iteration

I would like to have a filtered version of a collection as the source data of an aura iteration. Basically, something like this: <aura:iteration items="{! v.myList.filter(element => ....) }" ...
user avatar
  • 205