We’re rewarding the question askers & reputations are being recalculated! Read more.

New answers tagged

1

As suggested by sfdcfox you can use, data attributes, if you dont wanna use data attribute you can use lightning-input name attribute instead. <template for:each={wrapped_records} for:item="w_record"> <tr key={w_record.unique_name}> <th data-label="UniqueName" scope="row" key={w_record.unique_name}...


2

Here's a Playground that demonstrates how to set an onchange handler like what you're asking for: import { LightningElement, track } from 'lwc'; export default class App extends LightningElement { @track rows; connectedCallback() { this.rows = [{id:0,value:''},{id:1,value:''},{id:2,value:''}]; } handleChange(event) { this....


0

Instead of aura:if I used the aura:id and hide and show for the classes, and that did function var showAccount = component.find("auraid"); $A.util.addClass(showAccount, 'slds-show'); $A.util.removeClass(showAccount, 'slds-hide');


0

Try this in your VF page and use the name of your static resource accordingly : <apex:page showHeader="false" > <link rel="SHORTCUT ICON" href="{!URLFOR($Resource.favicon)}"> ..... </apex:page> Reference doc


1

add this in goToTop function remove everything else this.template.querySelector('.test').scrollTop=0; and in the html class assign class name test like <div class='test' style="overflow: auto; position: fixed; top: 0; left: 0; right: 0; bottom: 0; " onscroll={onScroll}>


2

You used value instead of checked in body checkboxes. <td> <lightning-input type="checkbox" variant="label-hidden" checked={lineItem.includedInAutomatedSupplies} data-key={lineItem.lineItemId} label="dataCheckbox" onchange={dataChekChange}> </lightning-input> </td> ...


0

You can use scale() function in CSS. Example for outermost component CSS: * { transform: scale(0.8); // 80% zoom/scale } Output: And here is the playground link for you.


3

The reason you are not able to get percentage is because the wired data is immutable. So, you can get the clone as below after which it should work: if (data) { this.lineItemData = [...data]; } I assume data here is the list of records and so using [...] You do not need key on all tds . Even if you use label-hidden variant, you need to put label for ...


1

The Field API structure is like { "fieldApiName":"Type", "objectApiName":"Account" } I updated the code it may help you and it is working as expected to me. HTML Code <template> <div if:true={options}> <lightning-combobox label={picklistlabel} value={value} placeholder="--...


0

You cannot dynamically import a field like this: import CUSTOM_FIELD from '@salesforce/schema/Object__c.Field_Name__c'; In general, I would recommend using lightning-record-form with lightning input field to achieve the requested functionality.


2

The edit icon visibility depends on various css classes. Here's the standard css in the lightning design system: .slds-hint-parent .slds-cell-edit:hover .slds-button__icon_edit, .slds-hint-parent .slds-cell-edit:hover .slds-button__icon--edit, .slds-hint-parent .slds-cell-edit:focus .slds-button__icon_edit, .slds-hint-parent .slds-cell-edit:focus .slds-...


1

For any custom component, you can take the code reference from lightning design system. Created a playground link for you with sample code. Output: However note that you still need to handle events like open/close picklist, selection/deselection of options, etc.,.


0

Try the following css. <style> /** * Sheet Settings */ @page Section1{ size:420mm 297mm;/*width height*/ mso-page-orientation:landscape; margin-top:20mm; margin-bottom:20mm; margin-right: 30mm; margin-left:30mm; } /** * Range for one Sheet */ div.Section1{ ...


1

If you check your browsers devtools, all your components will be available in ../modules/c. There you can add breakpoints and debug as you normally would. Turn on debug mode for your user to see the unminified versions of your code.


3

HTML and Javascript are cAsE sEnSiTivE. The only way to debug is through javascript (you cannot really do anything in HTML). getAccList({ name: this.searchKeyAcc }).then(result => { this.accounts = result; console.log('accounts => ', JSON.stringify(this.accounts)); }) .catch(error => { this....


3

You cannot stop that, also it's not recommended to manipulate dom based on ID, as the framework replaces custom id to globally unique id in the page. So to get element you have two options. Get it by class query selector. get it by Data attribute. Here are the examples for the same. Class. let div = this.template.querySelector('.popup'); Using the data ...


Top 50 recent answers are included