Stack Exchange Network

Stack Exchange network consists of 175 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

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.

0
votes
0answers
13 views

AccordianSection name property is dynamically not changed, leading to serious problem in iteration

Hi I am working on a problem where I have multiple records of an Object to be shown and each of these records, will have many child records of It's Child Object. I have chosen AccordianSection to ...
0
votes
1answer
24 views

How to use Wrapper classes in lightning component to iterate over wrapper class record list

I wants to use wrapper class object record list in lightning component and iterate over it to display the field values in all records as table. PFB the code that i have written. The problem response....
1
vote
1answer
22 views

Aura iteration returning blank rows(with correct number of rows)

My requirement is to display all the saved values on load for a Custom object called Company__c. Fields being Full_Name__c (text), Address__c(text area) , Director_Name__c (text), Phone__c (phone) and ...
0
votes
0answers
32 views

how to control number of records in aura iteration? [duplicate]

I have a lightning component with aura iteration. i want to dspaly only up to 5 records in the boxes. variable 'FslFromBox' is having around 70 records here. and i am displaying this in one single ...
2
votes
1answer
42 views

How do I get the value of a row of HTML table in an aura iteration with onclick?

I am trying to make a functionality where my lightning component shows a table of records and I want to make it so if you click a records row, it autofills my form with that records information. Here ...
0
votes
0answers
15 views

lightningselect performance

i am currently rendering a list with ca 50 records which takes very long. I have figured out that this is due to the lightning:select being in each row. The options are rendered through aura:iteration....
0
votes
1answer
18 views

How to edit a specific row/index in aura iteration by javascript?

Hi I am trying to edit a specific row in an iteration based on an onchange event. One of my columns in my iteration is a picklist. And depending on what is selected I want the rest of the columns in ...
0
votes
1answer
29 views

update current component elements only in aura:iteration

I have loading lightning components using below aura:ieration condition. in itemMap had 2 items, it's loaded fine, but when i update 2nd item type change, it's update 2nd item sub type as well as 1st ...
0
votes
2answers
99 views

Unable to display the multiple picklist field values in lightning component

I am trying to display 3 different picklist field values in a input form using lightning component. I am able to display the values for any one of the picklist field only. If I try to display the ...
0
votes
0answers
17 views

Dynamically change style for iterated list

Wanna add some color gradation(if its possible without js calling) for my iterated elements, but got some trouble with calling index value inside style param. Code look like this: <aura:iteration ...
0
votes
0answers
107 views

Lightning Data Table and Aura Iteration

I am trying to render multiple data tables on a page (inside lightning accordians but thats irrelevent) using Aura iteration. i am specifically having trouble with the data attribute of the datatable. ...
1
vote
1answer
19 views

Lightning radio selector in iteration disappears when option selected in another row

I have created a Lightning component that allows users to dynamically create their desired number of records. I implemented a data table for this. In my third column, I asked users to select from two ...
1
vote
2answers
55 views

How do i iterate over a list with 3 different object types in lightning component?

I am building a lighting component which needs to iterate over a list with three different object types but I have run into a problem because I cannot write an aura if expression which checks the ...
0
votes
0answers
19 views

Aura:iteration takes more time to load

I am creating a dynamic grid (table) with more than 10 rows and 10 columns, Displaying the record and editing. My question is server side takes say 2 seconds to load the data(querying data with 10-...
0
votes
0answers
57 views

saving an object array field value inside aura:iteration of lightning :carousal

Scenario : Retirving 4 product records including 3 fields.id, image(richtext field) and name.Displaying image in lightning carousal and also name as the header..Now I want to hold the product id , ...
1
vote
1answer
71 views

Aura:iteration with Data Tables and setting the order to descending as rows are inserted

So we have a client that has a form page where a Data Table is built based on input. As they enter items the table sorts them by index (i'm assuming) in ascending order. Without making the user sort ...
1
vote
1answer
151 views

To compare old and new value inside aura:iteration in Lightning component

In Lightning I have a requirement where I will iterate a List and display it as a table.While iterating I need to compare old value(last iterated row value) and new value (value in current iteration) ...
0
votes
1answer
56 views

How change the value in lightning iteration

I want change the value in the iteration. I want show fields of Account: Item_1__c, Item_2__c, Item_3__c, Item_4__c..... (we have 12custom fields Item_X__c, but we want show only 6 by default, and ...
0
votes
0answers
84 views

Generate breadcrumbs dynamically in lightning navigation topics, using <aura:iteration>

I am trying to build a lightning component which would generate breadcrumb dynamically in response to a onclick event on the Navigational topic bar, in lightning communities. I am referring to the ...
0
votes
2answers
39 views

Lightning components - Initiating attribute with controller with multiples sObjects

I'm Working on Lightning components I would like to add some values in my App, by its controller (aura:handler) I'm trying with this : component.set("v.objetsCamping", tabObjets); But it doesn't ...
0
votes
0answers
111 views

Verical tabs - unable to get selected tab dynamically

We have created vertical tabs using lightning:tabset but we could not able to put the icon on the lihgtning:tab . So we are converted lightning:tabs to vertical tabs. But we are not able to capture ...
1
vote
1answer
90 views

Find value of div inside aura iteration on icon click!

I am trying to find the value of a div which is inside aura iteration on icon click which is also inside the same aura iteration. Here in this code below I am trying to find the value of the aura:id=...
0
votes
0answers
24 views

Incorrect index value being displayed on selection of radio button

I'm iterating over a list using aura:iteration. Each iteration I have a radio button where I have an attribute named data-index="{!index}". In the controller, when I try to print which radio button ...
0
votes
0answers
104 views

Sorting the items in the desired order in lightning component aura:iteration tag

I am displaying list of records using aura:iteration, now i want to put to arrow marks(up and down). if user clicks on any one record want to move that record in the selected direction either up or ...
1
vote
1answer
43 views

Trouble with aura:if

I am not sure why this is not working. I have an aura:if condition, if the check matches then the item should be displayed. Here in this code below I am checking the ofc.agentName is not empty then ...
1
vote
0answers
67 views

create account from a button inside aura iteration and set account id to the adjacent lookup column

I am new to lightning. I am inserting list of contacts in aura iteration with account lookup. I made custom component for searching account, which works fine. But i also need to give option to create ...
0
votes
1answer
112 views

Using lightning component inside Aura:Iteration. It doesnt display anything not even any error

Im using lightning component inside Aura:Iteration. It doesnt display anything not even any error. PFB Code <aura:component > <aura:attribute name="item" type="Camping_Item__c" required="...
1
vote
1answer
27 views

Get Task description with line breaks in SOQL

I have a lightning component that displays a List of Tasks in a sidebar. I use a SOQL query in the controller to fetch a List that fits the criteria and display them in the component. I manually model ...
1
vote
0answers
342 views

Lightning button attribute “Disabled” in “aura:iteration tag”

I'm trying to enable a lightning:button if a lightning:inputField changes. This is the aura:component: <aura:component implements="flexipage:availableForRecordHome,force:hasRecordId,force:...
0
votes
1answer
192 views

Lightning Input inside aura iteration

I have a situation where i have multiple lightning:inputs written inside aura:iteration. I JS controller i am trying to find the input by using Component.find(),but i came to know component.find will ...
1
vote
1answer
174 views

Second <aura:iteration> not working with object/array datasource

I have a Lightning component with two <aura:iteration> <aura:handler name="init" value="{!this}" action="{!c.doInit}" /> <aura:attribute name="invoices" type="Object" /> <aura:...
0
votes
1answer
24 views

Aura Iteration is returning 0 rows

I have a below lightning component Please ignore the commented lines <aura:attribute name="serverResponse" type="ReportsController.COABReportLineItem[]" /> <aura:handler name="init" value="...
0
votes
2answers
188 views

Uncheck child component checkboxes from parent button

How can I reach this behavior? My component is structured like this: <aura:component> <button onclick="{!c.clearCheckbox}" /> <aura:iteration items="{v.items} var="i"> ...
0
votes
1answer
21 views

Child component not displaying records from Parent record

I am passing the results from Parent component to Child component but the results are not displayed for some reason. I have gone through many example codes and it seems I have done everything ...
1
vote
1answer
108 views

Lightning Component integer attribute not matching javascript integer

I have an attribute of type integer. <aura:attribute name="selectedRowNum" type="integer" /> I also have an iteration component in which I get the index of the current object that is being ...
2
votes
1answer
302 views

How to conditionally render rows in iteration lightning component

I have a lightning iteration component that shows several information on accounts in a row. One of the columns allows the user to choose a lookup( I use a custom lookup component) value to edit the ...
0
votes
1answer
207 views

setting value on a div not working

I cant set value on div during aura iteration, the reason why I need to set it on a div cause the div is writable contentEditable = true;I want to display value there so it can be edit it. <aura:...
1
vote
2answers
342 views

How to find id of lightning component tag which defined in iteration?

<aura:iteration items="{!v.List}" var="item" indexVar="i"> <div id="{!v.globalId + '_option'}" data-index="{!i}" data-id="{!item.Id}" onclick="{!c.jsFunction}"><text-...
0
votes
1answer
2k views

aura if comparing iteration variable

I would like to know if it is possible to evaluate the expresion not comparing to a constant but instead to another variable, like the iteration variable from aura:iteration. I want to evaluate the ...
0
votes
0answers
30 views

Change CSS style for iterated <div>'s [duplicate]

The goal is to apply a CSS style to iterated <div>s to display that the field has been modified. I think I am close but my indexVar is returning the error "Cannot read property 'dataset' of null"...
0
votes
1answer
358 views

Use document.getElementById for elements that load from server data

I use document.getElementById with the id attribute to locate elements in my component. I cannot use component.find and aura:id because the elements are generated from an iteration. This iteration is ...
0
votes
1answer
161 views

Passing iterated variable from Markup to JS Controller

I need a way to keep track of each iterated lightning:inputField so that any changes made to that specific field is reflected by a CSS style change. Markup <aura:iteration items="{!v....
2
votes
1answer
205 views

Iterate related records, display images from string name of contentAsset in Community Cloud

I'm very new to Salesforce, so my apologies if my approach is all wrong. I want to display a list of buttons with images using a lightening component in Community Cloud. The list comes from records ...
1
vote
1answer
1k views

aura:iterate in two columns

How would one create a two list column and be populated with an iterated list. Right now, both columns just repeat themselves with the same {!v.Name} data. I would like to remove the repetition and ...
1
vote
1answer
651 views

lightning:datatable won't populate with data inside aura:iteration

I have an iteration to set up datatables in slds accordions in my lightning component: <ul class="slds-accordion"> <aura:iteration items="{!v.definitionObjects}" var="objStats"> ...
0
votes
1answer
163 views

lightning component - passing a list of objects to a child component

I have a map attribute that holds the following map<string,list<SObject>> I want to iterate over the map and pass the list down to a child component but keep getting an error. This is ...
4
votes
1answer
98 views

Is it prudent to use force:recordData (and similar) within aura:iteration?

The aura framework and lightning:recordData currently (Summer 18) support only single object retrieval. Let's assume I got a listItem.cmp into which I wired force:recordData in VIEW mode or a ...
1
vote
1answer
828 views

Display fields if null in an aura:iteration

I'm making an edit records component on Opportunity where I display fields from related objects like Account, the Primary Contact and Contact Role only if their value are null. For the Account and the ...
0
votes
0answers
154 views

Change event on UI:InputText in Aura:Iteration throws 'afterRender threw an error in 'ui:inputText' [(a || s).replace is not a function'

I am facing a very strange error when applying change event on UI:InputText that is inside Aura:Iteration. When I focus out of the Input it throws me below error. This page has an error. You might ...
4
votes
1answer
534 views

Updating aura attribute in 1 aura:iteration does not reflect the changes in another aura:iteration

I've created a simple lightning app which has an aura:attribute of type Object[] with 3 objects in it. I'm binding their selected property to a lightning:input of type checkbox. When I update the ...