Questions tagged [html-template-directives]
The html-template-directives tag has no usage guidance.
13
questions
0
votes
2
answers
813
views
lwc:if and lwc:else directive not working
child cmp html
<template>
<!--Edit Mode-->
<template lwc:if={_isEditable}>
<input type="number" step="1"></input>
<button>
{...
0
votes
2
answers
875
views
Why does my array not show up in the template for:each?
I am trying to get a value from a list of objects to show up on the html page using the for:each directive. I have a then method that dynamically builds an array of objects that holds an id number and ...
3
votes
1
answer
307
views
replacing visualforce conditional rendering formulas in LWC
so I'm migrating a visualforce component into LWC. In that component, there is a table rendered, and a lot of columns are rendered differently depending on data field values and/or some other ...
1
vote
2
answers
5k
views
LWC Template if:true Directive not working
I'm trying to conditionally hide the lightning-tab,using if:true directive .The "courses" array is populated or empty using @wire adaptor.I am trying to use if:true condition to check if ...
1
vote
2
answers
3k
views
LWC Get record field values and render DOM elements conditionally
I want to create a custom component for a record page that gets a field value for the record, determines if the value is null or not. If it is null, some content will be shown and some will be hidden. ...
0
votes
0
answers
6k
views
input type="date" shows "dd-mm-yyyy" for empty value
let's say i have
<div class="slds-form-element__control">
<input type="date"
id="form-element-expiration-date"
...
1
vote
1
answer
378
views
Can I build a SPA using lightning web component framework outside Salesforce
I want to build a single page web app (not in Salesforce). Just like when we write html using Angular, you import JS and CSS (from Angular or react framework CDN). Similarly is it possible to do such ...
4
votes
3
answers
25k
views
Is it possible to use expressions in if:true or if:false tag in LWC?
I have 8 parameters to render the elements conditionally, Is it possible to use expressions in if:true statement?
for example:
<template if:true={p1.data || p2.data || p3.data}>
<!-- some ...
0
votes
1
answer
2k
views
Is comparing two values possible in Html file of LWC?
I need to compare a list of pricebook IDs in a pricebookentries of a product with a list of PricebookIDs. Is it possible in HTML template? I'm attaching a image to get an idea of the table.
Here PB1, ...
1
vote
1
answer
3k
views
LWC conditional display on load of component not working
Based on the field values of the Account, I want to display/hide parts of the component when it loads for the first time. I have tried so many things unsuccessfully and am hoping someone can help me ...
2
votes
2
answers
6k
views
lwc looping till a certain number in html
In lwc for looping through data we have
<template for:each={contacts} for:item="val">
</template>
If i have a variable where in a number is stored, say for example 4. How do i run the ...
0
votes
1
answer
5k
views
Template marketing cloud: I would like to unlock full html, so that I can personnalize my template with class and tables
I used a marketing cloud template and I want to customize it with extra html (to make it render well on a specific email client). The thing is that when I click on code view > toggle 'show full ...
12
votes
2
answers
27k
views
appendChild to non empty div in lightning web component
I am using a thrid party library to render certain elements in a 'container', and as per the documentation on lwc directives, I understand that I have to add a directive to specificaly indicate that ...