Questions tagged [aura-attribute]
Describes an attribute available on an app, interface, component, or event of the aura framework
15
questions
15
votes
3answers
4k views
Dynamically created component with aura:id, set as a Facet inside a parent component, is not found when calling find() and passing in aura:id
I would have expected that when a dynamically created lightning component is assigned as another component's attribute of type Aura.Component[], also referencing it in the parent component's markup ...
6
votes
2answers
2k views
Why won't my Lightning Component Attributes store entered value
2/15/2017 Update
Per comment from Doug in one of the answers this is an issue with Locker service. I verified that with Locker disabled is works as expected...
In Spring 17 as of today, with locker ...
3
votes
2answers
2k views
Unable to set an Inner Class as Aura Attribute type
Since SF update to Summer 18, we are facing this issue where an Inner Class could not be set as an Aura Attribute type.
Lightning Component
<aura:component implements="force:...
3
votes
1answer
1k views
Lightning Object binding via attribute
Can someone explain me, why object binding is not working?
cmpOne.cmp
<aura:component extensible="true" abstract="true" access="global">
<aura:attribute name="testObject" type="Account" ...
12
votes
3answers
3k views
Lightning: dynamic index in aura attribute with type List
related post
I am having the same issue. Trying to access array with dynamic index arrayList[index] (index from aura:iteration), but Salesforce doesn't support that.
Does anyone know how to do this?...
9
votes
1answer
6k views
Using a Map type attribute in aura:if
Trying to create a custom Navigation Bar and display menu entries based on user privileges.
I defined this attribute in my component:
<aura:attribute name="navItemPrivs" type="Map" default="{ ...
6
votes
1answer
625 views
How to prevent the component from being destroyed when it is referenced in multiple places?
I am referencing the component instance X within multiple other components dynamically. When I remove component instance X from one of the components, it is removed everywhere. The question is: how do ...
4
votes
1answer
7k views
Aura Attribute of Type Map is not working
I have declared an auro Map attribute in my Lightning Component but when i try to set key value pair to the Map in CLient-Side Controller it throws null error.
COMPONENT CODE :
<aura:component ...
2
votes
2answers
2k views
Lightning component not getting on load value
My lightning component -
<aura:component access="GLOBAL" implements="forceCommunity:availableForAllPageTypes,force:appHostable">
<aura:handler name="init" value="{!this}" action="{!c....
6
votes
1answer
1k views
Binding Javascript Objects to Aura Attribute Collection Types
I was testing Javascript Object Types and trying to bind them to aura attribute Collection types unsuccesfully client-side (for the most case), so I was wondering if there is a reference with a set of ...
5
votes
3answers
7k views
Check component attribute exists
How can I check whether a certain attribute is existing within my component?
Especially when I try to access a value dynamically like component.get("v." + fieldName) I want to make sure this is not ...
5
votes
2answers
940 views
Detect lightning:recordForm change in mode attribute
I'm trying to disable some surrounding components based on the mode attribute within lightning:recordForm (i.e. anytime I'm in edit mode, I'd like to disable a lightning:buttonMenu that sits just ...
4
votes
1answer
470 views
Binding Javascript map to Aura Attribute map
A similar question was asked here but unfortunately not appropriately answered.
I have my aura map declared as follows
<aura:attribute name="productInfoMap" type="Map" default="{}"
in my ...
1
vote
1answer
1k views
Pass Parent reference to Dynamically Created Lightning Component
I'm trying to create a lightning component ("filterPanel") that would dynamically create some child components ("customFilter")
I would like to pass the parent to children to avoid communicating with ...
0
votes
0answers
53 views
How to change the value of aura:attribute inside a aura:iteration when a condition is met?
I want to change the value of aura:attribute when a particular condition is met inside an aura:iteration. This is the code:
<aura:component>
<aura:attribute name="products" type="List" ...