Skip to main content

Questions tagged [lwc-dom]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
1 vote
1 answer
50 views

Validate method breaking jest test

The validate method checks whether or not the elements are valid before dispatching an event. When i remove the validity check method from my code and run the test it passes so its something with that ...
mrgagne's user avatar
  • 23
2 votes
0 answers
43 views

Lightning-base-components deprecated

The NPM package of "lightning-base-components" seems to have been deprecated. Do anybody know why and whether we can expect it to become available again later? We have several project where ...
Rasmus Hummersgaard's user avatar
0 votes
1 answer
158 views

How to place a custom footer below the screen in Screen Flow?

In my Screen Flow, I need buttons that are not available in the Flow Builder, so I developed a custom lwc component - a footer with the buttons that I need. I placed this custom footer under a data ...
MirniyPirojok's user avatar
1 vote
0 answers
25 views

How to improve (decrease) loading time of checkboxes onto lightning-card lwc component

I have a lwc component called the c-record-card which utilizes the lwc lightning-card component to display records fields on the card - essentially the card represents a SObject record (see below for ...
jsonm's user avatar
  • 11
0 votes
1 answer
37 views

LWC Injecting HTML

I'm simply trying to use the lwc:inner-html example provided in the link below and can't get around the compile error: LWC1534: lwc:inner-html attribute is not supported. https://lwc.dev/guide/...
bernard's user avatar
1 vote
1 answer
67 views

LWC remove option from lightning-input-field type combobox

I have a lightning-input-field that shows picklist options I need to remove one of the options at run time, I tried using querySelector to hide the option but it always returns null. <div class=&...
Kevyn Herbet's user avatar
0 votes
1 answer
66 views

Dispatch event is not propagating to parent LWC

There are 3 data providers, OrderDataProvider (available at Page level), OrderDeliveryGroupsDataProvider (dependent on OrderDataProvider property -> DeliveryGroups), OrderLineItemsDataProvider (...
Paras Saini's user avatar
4 votes
0 answers
45 views

JAWS reading the error message twice in lightning input LWC

JAWS reads the error message on the lightning input twice, because of the presence of both aria-errormessage and aria-describedby attributes. Values for both attributes are the same. How to resolve ...
LoneWolf's user avatar
0 votes
1 answer
35 views

Business scenario on why we need bubble=true and composition=false in LWC

As far as I understood, we need {bubble:true,composition:false} on firing event from child component to parent only when we want the event to be received above in the immediate DOM elements of Parent ...
Sukruti's user avatar
  • 472
1 vote
1 answer
257 views

Adding event listeners in the Constructor of LWC

Generally, In Lightning Web Components (LWC), you should not manipulate the DOM or add event listeners in the constructor. The constructor is called when an instance of the component is created, but ...
Rahul Allada's user avatar
1 vote
0 answers
140 views

How to use LWC to capture opportunity data and create new opportunity with modified data

I am using Quick Action on Opportunity record to create an LWC to edit Opportunity record and create a new record. I am unable to display the data on template.Here is my JS of Record Edit Form LWC ...
Jagadeep K's user avatar
3 votes
3 answers
382 views

Understanding different events fired by LWC Components

When to use event.target.value, event.detail.name or event.currentTarget.name and what else. More Info While building my LWC I ended up using all the three above event variables because in certain ...
Vikash's user avatar
  • 45
0 votes
1 answer
110 views

Is there a way to change the lightning input placeholder color?

message-when-pattern-mismatch="First Name accepts only characters(a-z)" message-when-value-missing="First Name is required" class=&...
Yuqi Sui's user avatar
1 vote
1 answer
284 views

How to show dependent picklist based on controlling field in Lightning data table

My component showing Controlling picklist and dependent picklist values as expected. But when i edit Controlling picklist then dependent picklist showing all values not related to the Controlling ...
Afrose ahamed's user avatar
0 votes
0 answers
110 views

How to add style to lightning combobox?

how can I add style to the combobox input and option items? ><lightning-layout-item size="12" padding="around-small"> <label class="custom-...
Yuqi Sui's user avatar
0 votes
1 answer
59 views

Why LWC component is reloading due to the recordtypeId is changed in Record Edit Form

My LWC component has lightning-record-edit-form, and it is working fine in normal scenario. But whenever there is an update in recordtypeId field, it reloads the whole page. things I already checked: ...
Mrinal Sharma's user avatar
1 vote
0 answers
603 views

Retrieve the current input value from lightning-record-picker when user presses "ENTER"

I am using lightning-record-picker + lightning-pill to allow for selecting user email records. I am able to get the current value of the record picker by using the "onchange" event. However, ...
Isaias's user avatar
  • 11
0 votes
1 answer
141 views

onscroll event not getting called in lwc

We have lwc component which is placed in aura community page. This component has lwc-datatable and some other html tags. I have tried attaching onscroll event on many different tags including ...
Ankuli's user avatar
  • 680
0 votes
1 answer
150 views

Lightning progress indicator does not render correctly

I'm creating a custom path for the Case Status field to use in a Community page. The Status values are dynamically populated since different Record Types have different Statuses. My problem is that ...
banjug's user avatar
  • 29
0 votes
1 answer
549 views

Adding extra button to Lightning-Confirm

I want to add another button to Lightning-Confirm so that I can redirect users to another community page on click of that. Is it possible to do so? Another way I'm looking for is to add a URL in the ...
Ruturaj Chothe's user avatar
0 votes
0 answers
71 views

loadScript in LWC throwing error - because of location object

I am using a third party library which is using global location variable and it throw the error when run that js code using loadScript in lwc. I wrote a few lines of below custom js code to run as ...
Gopal's user avatar
  • 310
-1 votes
2 answers
720 views

Change date format like dd/mm/yy

Here is my code, I am trying to change date format from YYYY-MM-DD to DD/MM/YY format. How Can I resolve with this one? As well I am passing the value and label to the parent component that is also ...
blackFire's user avatar
0 votes
1 answer
228 views

How can I remove onmouseover Event onclick of a button LWC

<div class="slds-col slds-size_8-of-12 messagecontainer" onmouseover= {handleMouseOver} onmouseleave={handleMouseLeave}> What I want is when I click a certain button I want to nullify ...
SFDC_learner's user avatar
0 votes
1 answer
371 views

Error Failed to load PDF document LWC

I am facing an issue while trying to generate PDF file using LWC component. I fetch data from a HTTP callout and try to generate a PDF file out of the response and display using LWC. What can be the ...
Sriram Lns's user avatar
0 votes
0 answers
74 views

Handle click event in experience site Nav bar menu ( Home menu) when clicking from a LWC component

I am trying to handle a click event on any of my Experience site menu items from one of my lwc components TO Handle when there are any unsaved changes and a user is navigating away from the page after ...
Shubham Kumar's user avatar
0 votes
1 answer
39 views

LWC Template tag not working for conditions [closed]

<template if: true= {isFlagValue}> showing some content on page when isFlagValue true but after getting false value for isFlagValue I am able to see content Heading
sneha's user avatar
  • 7
0 votes
1 answer
160 views

Change Data Capture and LWC on Mobile App?

I Have a LWC component setup to use CDC to refresh the apex of a varity of objects this intern affects the DOM (icons change / menu options change etc) this works fine on desktop however on the ...
ravent's user avatar
  • 57
0 votes
1 answer
159 views

Increase the performance/speed of Jquery dataTable in a LWC component

I'm using Jquery dataTable in a LWC component to load around 1500 records from Salesforce into the table. I'm using a SOQL query to fetch the records from SF and load them into the table. The data is ...
Rose Mirzaei's user avatar
-1 votes
1 answer
418 views

Salesforce LWC nested for each loops with if condition

I am trying to implement a listbox in LWC. The list box is showing values from a picklist in Account object. On click the value of the selected item is adding to an array. But on the UI it is not ...
Hasan Zubairi's user avatar
0 votes
0 answers
368 views

Access this.refs / lwc:refs="" when testing in jest?

I am attempting to use this.refs from with a jest test like this: <template> <input lwc:ref="inputEl" /> </template> // input.test.js import { createElement } from 'lwc' ...
lu_ke____'s user avatar
  • 453
0 votes
1 answer
230 views

LWC issue with array variable being blank when accessed from another function

I am building a custom file upload component as follows. I prepare my list of uploaded files inside the function handleFilesUpload. I then call another function called handleSaveFiles but inside of ...
degmo's user avatar
  • 61
0 votes
1 answer
135 views

@api variable name is 'template'

In my LWC we have a variable name 'template' . @api template Due to which below line is not working. ...this.template.querySelectorAll('lightning-input') Is there another way to grab all input ...
shamikh's user avatar
  • 43
0 votes
1 answer
476 views

Throw an error and block users when LWC is placed on wrong page type

I'm trying to do something, but I am stuck on this scenario. So, I have a lwc that can be placed on multiple pages (Record Pages, Home Pages etc). The users will define the component destination, in a ...
blanco17's user avatar
0 votes
1 answer
509 views

LWC lightning-modal initial focus on header

According to documentation lightning-modal documentation When the modal opens, focus goes to the first interactive element in the modal. If the header includes a link in tagline text, the link gets ...
sfrazlond's user avatar
2 votes
1 answer
495 views

LWC - Using lwc:dom="manual" to render text with innerHTML but it does not work

I'm using lwc:dom="manual" and querySelector to capture and display the text content but it does not work. HTML code <h2 class="slds-truncate" title={record.Name}> <a ...
Pam's user avatar
  • 107
1 vote
1 answer
96 views

Newly record not showing up when created using the 'createRecord' from 'uiRecordApi'

I am practicing Apex but I guess I'm stuck on trying to achieve something. I have a memory game in Apex. When a user finishes with the game, an record is inserted using the 'import { createRecord } ...
Pedro Henrique Ferreira's user avatar
0 votes
0 answers
261 views

How to render an array of objects (label,value pair) effectively on a lightning checkbox group functioning as a dropdown?

I need a checkbox group as a dropdown and have the following array formed in LWC JS handleShowingStateFilters(resultSet){ this.stateFilterOptions = []; this.tempArray = Object.keys(...
amitsingh6651's user avatar
0 votes
1 answer
91 views

I can't refresh the data from the button on LWC component

I created this component and the idea is to get all the files and put in one place. But I also need to add a refresh button, so it could return and new files that were uploaded. But I am not sure how ...
Fabio Niglio's user avatar
0 votes
1 answer
4k views

Uncaught (in promise) TypeError: Cannot read properties of undefined (reading 'values') [duplicate]

I need to render some values in the screen based in boolean variable (isLaborOrPartsLabor), and i'm setting this one in a method inside the renderedCallback(), basically, when this one it's true i'm ...
Gustavo Fazilari's user avatar
1 vote
1 answer
281 views

LWC @api param is being passed by reference or not?

I have a parent component with this JavaScript code: import { LightningElement, track } from 'lwc'; export default class ParentComponent extends LightningElement { myValue = { value:'hello' ...
Juan de la Fuente's user avatar
0 votes
1 answer
308 views

After adding a slds float left for second line onwards its not aligned to left any suggestion for this?

<div key={rec.Id} class="slds-clearfix slds-float_left"> <h2 class="slds-text-heading_medium slds-hyphenate heading-title"> {rec.Name__c} </h2> </div> ...
Somesh's user avatar
  • 1
0 votes
1 answer
451 views

How to change the css of a standard SF component in LWR site

I have been using an LWR site with no theme selected (Basically a blank theme). I have used the web-to-lead markup in a custom LWC, but I need to change the styling of the form. Is there a way to do ...
Darryl Le Roux's user avatar
0 votes
0 answers
30 views

How to refresh the list of records in lightning-datatable after adding a new record to it in LWC [duplicate]

I have an LWC component which has a list of records displayed onload from a wire method. I have an Add button below the list to create new values from a modal save. Now, When I click the add button, I ...
sfdcDev's user avatar
  • 67
0 votes
0 answers
363 views

How to call renderedCallback() in HandleChange field input only once

I have LWC with search input, with every handleKeyChange click on input, renderedCallback() is called, but I need it to call only once. Controller: @track hasRendered = false; @wire(getAcc, { ...
annat's user avatar
  • 1
8 votes
2 answers
7k views

Alternate to if:false in LWC

Now salesforce is going to deprecate if:true & if:false and the alternate to these 2 tags is lwc:if, lwc:elseIf and lwc:else Now replacing if:true is simple, just change it to lwc:if but if I want ...
gs650x's user avatar
  • 2,680
-1 votes
1 answer
251 views

Can we add a onclick listener to the Sales Path on Opportunity?

The Opportunity Sales Path I'm using is a standard one, and not taking the lwc route to implement the path. Is there a way to listen to any change here by some event listener on my lwc? So far, I have ...
Apex Srinivas's user avatar
0 votes
1 answer
559 views

Salesforce LWC - State management in checkbox input control

I am new to salesforce LWC. Developing a page with a checkbox inside a component. So my task is to maintain the state of the checkbox even after the page refresh. For this, I used session management ...
monk's user avatar
  • 3
1 vote
1 answer
219 views

recordId is blank in imperative call

I have an lwc action button that loads the popup. When i load the component for first time, recordId is present. But when i close and open it again(without reloading the whole page), recordId is lost. ...
SFDC coder's user avatar
3 votes
1 answer
620 views

Can you create a slot that moves in the DOM?

I have a generic component that renders a form in a slot. I want the layout of the component to be changeable. E.g. move the form from the right hand side of the screen to the top. The layout changes ...
Rob Baillie's user avatar
5 votes
1 answer
316 views

Loading / Destroying Many LWCs

I am looking to see if there are any best practices when developing a large LWC "app". The main challenge I am seeing is when I want to display a certain "screen" to an end user, I ...
Bryan Anderson's user avatar

1
2 3 4 5