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
1 vote
1 answer
64 views

How to dynamically select and disable an element in a row in the table when the other element is selected

I am new to Aura and hence was not able to find out the exact way to disable the column. We are building a table where I need to disable other cells in the row when one of the cell is selected. The ...
  • 372
0 votes
1 answer
207 views

Event.Target.GetAttribute returns null

I'm creating and displaying lightning buttons in aura components dynamically. On click of each button, I'm trying to fetch its index using event.target.getAttribute. I'm able to get it but ...
1 vote
1 answer
54 views

Show spinner for specific table row only?

I got a table with an account list, as such: <table> <aura:iteration items="{!v.accounts}" var="acc"> <tr> <td> <...
  • 691
0 votes
0 answers
31 views

How do I list the names of contacts of an account and navigate to the contact record when one is clicked on

I am trying to list the names of the child contacts of an account with the option to click on one of said contacts names and be redirected to its record page. Everything works except the redirecting ...
2 votes
0 answers
139 views

Route User to Newly Created Record from Flow

so using the Override Finish Behavior feature https://help.salesforce.com/s/articleView?id=sf.flow_concepts_finish_override.htm&type=5 I am having issues routing the user to the newly created ...
  • 117
0 votes
0 answers
43 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;} ...
-1 votes
1 answer
456 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",&...
  • 35
0 votes
1 answer
279 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=&...
  • 35
0 votes
1 answer
316 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 ...
  • 39
0 votes
1 answer
878 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 ...
  • 6,834
0 votes
0 answers
422 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 ...
  • 13
0 votes
1 answer
483 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 ...
0 votes
1 answer
292 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" ...
0 votes
2 answers
179 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: <!-- ...
  • 515
0 votes
1 answer
390 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 ...
0 votes
1 answer
391 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 ...
0 votes
1 answer
2k 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 ...
0 votes
1 answer
31 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 ...
1 vote
1 answer
675 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 ...
  • 15
0 votes
1 answer
184 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 ...
0 votes
1 answer
4k 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=&...
  • 21
1 vote
1 answer
758 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
53 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 ...
1 vote
1 answer
2k 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 ...
  • 2,395
0 votes
0 answers
645 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: ...
0 votes
1 answer
138 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 ...
0 votes
2 answers
2k 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 ...
0 votes
1 answer
28 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 ...
  • 13
0 votes
0 answers
78 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 ...
0 votes
0 answers
153 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 ...
  • 373
0 votes
1 answer
638 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 ...
  • 321
0 votes
1 answer
210 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 ...
0 votes
1 answer
192 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 ...
  • 2,274
0 votes
1 answer
199 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 ...
0 votes
0 answers
1k 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 ...
  • 654
2 votes
1 answer
5k 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 ...
  • 654
1 vote
1 answer
1k 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....
-1 votes
1 answer
38 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 ...
0 votes
1 answer
60 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"> <...
0 votes
1 answer
346 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 ...
1 vote
1 answer
490 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=...
0 votes
1 answer
256 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 ...
  • 145
1 vote
1 answer
2k 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 ...
1 vote
1 answer
36 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 ...
  • 13
0 votes
1 answer
1k 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-...
  • 2,918
1 vote
1 answer
666 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 ...
  • 898
0 votes
1 answer
152 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....
1 vote
1 answer
4k 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 ...
  • 295
0 votes
1 answer
355 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 ...
0 votes
0 answers
904 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', ...
  • 1