Questions tagged [aura-if]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
0
votes
2answers
27 views

aura:if visibility issue with force:inputField

I am having a problem with aura:if tag. As when my condition is false, my field will be invisible. The Problem is when my condition again went true from false then only Label of my inputfield is ...
0
votes
0answers
14 views

I need help with this Aura of statement. How to write an if statement if field one cannot be equal or greater than field two? [duplicate]

I need help with my Aura if statement.There are two time fields that the Start time can not be equal to or greater than the end time? I tried to write out the aura if statement but I am getting stuck ...
0
votes
1answer
45 views

How to write an if else statement in Aura

I tried to write out the aura if statement but I am getting stuck if someone can explain it to me in detail. thank you <aura:if isTrue="{!lessthan(v.Tl.time, v.Tl.End_Date_Time1__c)}">...
0
votes
0answers
13 views

Component not getting refreshed until user clicks somewhere in Lightning Component

I have aura-if sections in my lightning component which shows a pop-up if user click on edit for any record which is working fine. In pop-up, I have a button on click of which it does some processing ...
0
votes
1answer
34 views

How to call javascript controller method when a condition is met in lightning component?

I want to call a javascript controller method from the lightning component when a condition is met. This is the code I used: <aura:if isTrue="{!product.stripePlanId == v.chosenProduct}"> &...
0
votes
1answer
39 views

I get empty spaces where the components should been located

code <aura:component controller="ProductController" implements="force:appHostable,flexipage:availableForAllPageTypes" access="global"> <aura:attribute name="soqlRequest" type="String" ...
1
vote
1answer
34 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
1answer
192 views

Use variable from lightning:recordEditForm in aura:if

I would like to know if it's possible to evaluate the expression from the RecordEditForm. This component's "else" is never hit. Are aura if tags supported within RecordEditForms? ...
0
votes
0answers
30 views

Aura component don't follow the logic flow. Retrieve data && insert in Apex Controller

First of all, that's probably my mistake because is the first aura component i do. I've a component that get's data value from an apex controller wich, at the same time, insert a record in database. ...
0
votes
1answer
36 views

Aura isTrue not behaving as expected

I am getting a behavior in a component not behaving as expected. The Apex and Controller are returning exactly as they should be. When the word Green is passed isGreen should be true and isRed should ...
2
votes
2answers
99 views

Dynamically creating components vs Using Aura:if

Could someone please enlighten me on the pros and cons and use-cases of creating components dynamically from JavaScript as compared to using Aura:if in the markup to render components? I am not quite ...
3
votes
1answer
119 views

display the contents of aura:if from another component

I'm trying to show (or unshow) the contents of aura:if by changing the isTrue value from another component. The value of isTrue is changed but the contents cannot be displayed.. Anyone knows how to ...
0
votes
2answers
48 views

Selection is not working for third selection

I write following component code : <aura:component controller="TransactionsalSecurity" implements="force:appHostable,flexipage:availableForAllPageTypes,flexipage:availableForRecordHome,force:...
0
votes
1answer
285 views

ui input radio button is not working

Hello all i am working on one requirement where i want to display table on the basis of my ui radio button selection but here once i select the radio button options then iam able to display the table ...
0
votes
1answer
27 views

Ui input radio not working as expected

Their is a requirement for creating two ui input radio buttons although i achieve that but here iam facing a unique problem the input radio is not deselected on the selection of second one both ...
0
votes
0answers
37 views

<aura if> not working as expected

Hello I made a following component which displays all permission set which i want but now I am stuck. Here I want to display my selected permission set on the table. Although the table is displayed on ...
0
votes
1answer
86 views

Hide text using aura:if

I'm trying to troubleshoot here for a day. My end goal here is to hide the Test text, depending on the Product_Family__c value. Here is the code, please let me know what am I missing. Apex public ...
0
votes
2answers
140 views

Aura iteration is not holding on particular selection value resetting to first value every time loop is started

<lightning:select label="Permissionset Names" onchange="{!c.doInit}" > <option>None</option> <aura:iteration items="{!v.set}" var ="d"> <option>{!d....
-1
votes
1answer
75 views

<aura if is true> not working as expected

I wrote a following code for component but it is not giving result as i expected, Component code <aura:component > <aura:attribute name="parentOptions" type="List"/> <aura:...
1
vote
0answers
35 views

Lightning auraif render issue

I am having a complex application where I have 10 child component in a master component that is inside an application. I am passing complex type from master component to all the 10 components. This ...
1
vote
3answers
188 views

two with AND (&&) conditions in auraif

I have an auraif when I tried to use the condition And (&&) it points error: <aura:if isTrue="{!v.value == 'test' && v.recTypeName == 'testing'}"> </aura:if>
0
votes
1answer
569 views

Aura:if condition needs to be added in lightning select option [closed]

i am new to lightning and i need to add a aura:if condition to one of lightning select option. My lightning select option contains a none value along with other options that render data in a ...
2
votes
1answer
86 views

Aura if and order of execution on conditions

I'm working on showing a component if he is not admin, nor from France, Suisse or Canada : v.userProfile --> true for admins, false otherwise. Even for Swiss users, the component was displayed. I ...
0
votes
1answer
441 views

To call apex method every time when attribute changed

I have 2 components: - parent is Aura component - child is LWC component child component surround with aura:if and rendered in particular case. I need to call Apex method every time when 'param' ...
1
vote
1answer
278 views

how can we check 3 condition using aura:if

i have a radiobutton group which contains daily, weekly and monthly. when i choose daily radio option its showing picklist, when i choose weekly its showing picklist but when i select monthly radio ...
0
votes
1answer
69 views

How to change the value of disabled with aura:if?

I have a few text input fields and 1 lightning:input type="file": <lightning:input type="file" name="file" accept="image/jpg" id="photoFile" onchange="{!c.handleFile}" disabled="true"/> I have ...
1
vote
2answers
95 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 ...
1
vote
1answer
5k views

Aura if - isTrue parameter and multiple conditions

I'm trying this code : <!-- an exemple : isTrue='{!and(v.valueOneIsTrue, v.valueThreeIsTrue)}" >--> <aura:if isTrue="{!AND((v._candidateDetails.contact.Nationalite__c != null), (v....
1
vote
1answer
426 views

How to get checkbox value and change tht button's class with <aura:if>?

I want to change the button's style (class) by clicking and changing checkbox field Selected__c. But I always get class="blueColor" even if checkbox is true. When I write <aura:if isTrue="{!v....
0
votes
0answers
142 views

Lightning component doesn't refresh on second search

I am trying to load a Google map VF page in my lightning component and display leads based on city searched. The component loads properly with the leads on first search but on the second search the ...
0
votes
1answer
47 views

Attribute in lightning component is failing to evaluate properly in conditionals

I am unsure of what I am missing here... So I have a child component with an attribute: <aura:attribute name="recordClosed" type="Boolean" /> In the component I am doing something like this: ...
1
vote
1answer
67 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 ...
0
votes
1answer
135 views

Aura:if - check with a regular expression

Is it possible to write aura:if conditions with regular expressions. Ia m trying remove records if the a certain field in that record is not a number. <aura:if isTrue="{! !add....
0
votes
1answer
59 views

Aura:if not working as expected?

I am trying to display the price of the item if the price is not equal to 0. Whats would be wrong with the usage below? The '0' here is a currency data type in the custom object. Please advise! <...
6
votes
2answers
4k views

Aura:If vs Styling to show/hide content

Are there any benefits/negatives from either of the approaches below to conditionally show content in a Lightning component? <aura:if isTrue="{! v.myBoolean }"> The Content </aura:id> ...
1
vote
1answer
79 views

What impact have on performance of page loading when we use multiple Lightning:RecordForm in a single component

We are using multiple lightning:recordForm in different aura:if for the different condition in a single custom Lightning Component for showing different field. Is it the best practice to use ...
1
vote
2answers
5k views

Conditional Rendering in Lightning Component with more than Aura:If(True, ELSE)

I have a lightning:select picklist on a Lightning component called "Best Method of Contact" which is a required picklist, but the required picklist defaults to a blank 'placeholder' value that the ...
2
votes
1answer
5k views

Setting multiple conditions using conditional AND/OR Operators in aura:if attribute

I had tried this on my own, but couldn't achieve the functionality of having multiple conditions checked using conditional 'OR' operator of an aura:if attribute. I tried to render a div only when the ...
0
votes
1answer
9k 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
3answers
462 views

Aura:if displays both options

I have a problem with aura if in lightning component, the condition doesn't work, my code below : <aura:if isTrue="{!v.account.cel_email_mailable__c != 'N' }"> <div onclick="{!c....
1
vote
1answer
905 views

How to check if record field is empty using just the component syntax?

Using force:recordData to load a record data to a component, how can I check if a numeric field is null, to work with the aura:if syntax? I've tried != null, != undefined, != '', empty(v.record....
3
votes
3answers
196 views

Lightning Community: v.body on Custom Template is initialized even inside an aura:if

I have a Lightning Community and I'm using a custom HTML template to render my pages, inside this HTML template I have a v.body where my custom components are being displayed (the ones selected from ...
2
votes
1answer
399 views

Start Element <li> in <aura:if and end it outside the if

Here is my code <aura:iteration items="{!v.activeApplicationsList}" var="actApp" indexVar="itemNum"> <aura:if isTrue="{!actApp.status == 'In Review'}"> <li class="slds-...
0
votes
1answer
100 views

component.find throwing error when component is created conditionally in lightning

I have the following code in my component <aura:if isTrue="{! not(empty(v.assignedto)) }"> <lightning:input aura:id="assignedToInput" value="{#v....
0
votes
2answers
4k views

Lightning aura If is not working

I am trying to render 2 text according to change in button Menu select. I am able to get the value of the selected menu but the auro:if condition is not getting reRender properly. My code below <...
2
votes
2answers
3k views

Aura:if use a function as expression

I wish to check a condition inside an aura:iteration. The condition should be dynamically set according to the current item in the iteration. I'm trying to achieve the following : <aura:if isTrue=...
1
vote
0answers
943 views

Getting Uncaught Action failed: aura:if$controller$handleTheTruth [Cannot read property '$getType$' of undefined] error on Component.set

In my code, I am getting a list of Object from apex controller, and populating the same into an aura attribute paginationList. On the below line, I am getting the error: component.set('v....
4
votes
3answers
348 views

Lightning Locker proxying simple strings too?

I'm getting some strange results trying to do a simple demo of lightning:radioGroup using aura:if to conditionally render components. I've added a controller method to show the weirdness. Component: ...
0
votes
0answers
556 views

aura:if inside aura:set rendering empty value even if isTrue turns out to be false

I have markup as: Parent Component: <!--SOME MARKUP--> <c:modal title="Modal Title"> <aura:set attribute="right"> <lightning:button variant="neutral" label=...
11
votes
3answers
645 views

Is There a Limit to Lightning Formula Parameters?

As I use the client side to enforce various pieces of business logic with aura:if statements, I'm finding that a given formula operator cannot handle more than two parameters. For example, this works:...