New answers tagged

1

Just make this properties as getter like this: // Order Summary Report get orderURL() { return 'https://someReportViewer.&salesforce_salesman_number=' + this.salesNum + 'salesforce_customer_number=' + this.customerNum + '&ship_date_begin=1/1/' + this.startDate + '&ship_date_end=' + this.endDate; } // Average Selling Price Report ...


1

Both querySelector and Event.target will refer to the element so you can do the following with them. Access the disabled attribute directly: const adobeButton = this.template.querySelector('[data-id="adobeSignBtn"]'); adobeButton.disabled = true; handleButtonClick(event){ event.target.disabled = true; } You're not just limited to the ...


1

I personally like to keep by button declarations in a property to avoid these kinds of "scenarios" and If I need to modify anything, I just need to do so in the JS file without having to modify the HTML template and can easily access its props and modify them. Example: export default class MyLwcWithJSButtonProps extends LightningElement { ...


2

arcNumberInput needs to be preceded by this => this.arcNumberInput , otherwise the invocation won't work, and you will see something similar to variable x has not been declared or is undefined


1

You can use the HTMLSelectElement.options property of the select element to determine which item you want to select dynamically: const genderfield = this.template.querySelector('[name="genderfield"]'); genderfield.selectedIndex = [...genderfield.options].findIndex(option => option.value === 'Female');


2

The default HTMLSelectElement doesn't use "value" to set a value, it uses selectedIndex. Also, during connectedCallback, the template hasn't yet been rendered. Add an asynchronous callback, and you should be fine: setTimeout(() => this.template.querySelector(someCssSelector).selectedIndex = 1 ); In addition, you cannot reliably use Id values ...


0

You could also override the style using something like this style="border:solid red; border-radius: 2%;"


-1

Your problem is that id values in Lightning are modified to be globally unique, so it can be challenging to get the Id fragment correct. It is true that SVGs are restricted, but this is mostly just a mismatched ID problem. I don't have a specific solution to this problem, as only ID values are supported, and LWC "manages" them for us, making it ...


1

Please update your lightning modal content styles like below code. <div class="slds-modal__content" style="overflow: visible !important;">


Top 50 recent answers are included