Questions tagged [lightning-web-components]

This tag is for questions related to JavaScript, CSS, or Markup when used in the Lightning Web Component (LWC) programming model, or for questions of interoperability between LWC and the original Aura-based lightning components.

Filter by
Sorted by
Tagged with
0
votes
0answers
12 views

Values not getting populated in custom picklist

I have created a custom lightning page using Lightning web components, having a custom picklist in it, and I am trying to populate the values in the custom picklist on the click of the custom lookup ...
0
votes
0answers
11 views

CSS from parent to child [duplicate]

I have parent lwc component and nested child components which have the same custom styling. I want to create css in the parent and use these classes in the child components. How can I do it?
0
votes
1answer
15 views

Import/Load CSS or JS file from File Attachments instead of Static Resource in LWC

I have different css files for each record, which will be stored as a file(ContentVersion). I want to load that css in lwc. But getting this error. Refused to apply style from '' because its MIME type ...
0
votes
2answers
18 views

LWC Error on getting picklist values for specific recordTypeId

I'm getting an error every time I edit the Lightning Page layout. I'm not sure where or what I need to add to resolve it. I've done some googling and it's obviously related to something not being ...
0
votes
1answer
25 views

How to modify a wired result in a getter?

I have a wired function in an LWC that populates an array (records) on success returning an address for each array value. @wire(searchSomething, { searchSomething: '$searchObject'}) wiredContacts(...
0
votes
1answer
18 views

Multiple instance of child component does not function the same in For:Each in LWC

I have a lwc in which I have a lookup field and pick-list field, where lookup field is a child component and pick-list field is standard lightning-input. Here's the screenshot of the UI: Problem is, ...
0
votes
0answers
7 views

multiple conditions in array filter lightning Component

I'm trying to add AND condition in array filter to search in DataTable. Below is my js code: var data = component.get("v.data"), search = component.get("v.filterSearch")...
1
vote
1answer
16 views

Using Brand Theme Colors Within Lightning Components

we are attempting to style a few attributes of our LWC with colors from the active Branding Theme (not community themes). We're debugging our way through this. Also not finding much in the way of ...
0
votes
1answer
11 views

Way to give context to a JSON.parse reviver?

So I am formatting data inside JSON Strings and I need to use my application context (like this.name etc.) INSIDE the reviver. Code example of reviver: formatReviver = function (key, value) { if(...
0
votes
0answers
10 views

Placeholder on Rich input text area not updating

I have a lightning-input-rich-text in my component to which I set the placeholder text based on some conditions. The first time the component renders, the placeholder is shown as expected. After ...
0
votes
0answers
15 views

Unable to find sfdx-project.json file even if it is present in VS Code salesforce

I just cloned a remote repository from Git and opened it in VS code. I see sfdx-project.json file present, but still whenever I am running SFDX command it is giving the error saying sfdx-project.json ...
0
votes
0answers
39 views

Lightning Web Component - Navigation - Error any resolved solution there?

I have created Navigation to achieve the related list in Subtab in lwc it throws an error while clicking the Navigation. I Have updated the code there is any resolve solution there it could help me ...
0
votes
0answers
18 views

Best Way to Auth Against Microsoft Graph

I'm building a LWC/Apex component, that heavily utilises the Microsoft Graph Outlook API. I currently have it set up (still in development) in the way, that for every request I make to the graph API, ...
1
vote
0answers
31 views

Confused about promises and then

In my LWC JS controller, I have code like this: a() .then(() => { this.b(); }) .catch(error => { // error handling }) .finally(() => { // some other code }); Where a is an imported ...
0
votes
0answers
11 views

'No component definition' warning for LWC even though I defined the component on VF page (Lightning Out)

I am using Lightning out to display LWC on VF page. I have included the definition of LWC on the VF page. Even then, my LWC loads very slowly on the VF page and I get the following warning in the ...
0
votes
1answer
22 views

Call function from html - LWC

I have datatable with a lot of different values from fields and I need to calculate and show these values in datatable. I have getters for now which call function. Is it possible to call this ...
0
votes
1answer
16 views

querySelector returns null, how to reach a div inside another template?

I have the following HTML file for a LWC (details omitted): <template> <div id="main-div"> ... (A) </div> <template if:true={xyz}> ... (B) </template> &...
0
votes
1answer
22 views

Unable to apply filter on a custom lookup field, on the click of another custom lookup field

Project and Unit in a Master-detail relationship Project-Master object Unit - detail object Price - another custom object Price contains two custom lookup fields Project, Unit I have created a custom ...
0
votes
0answers
24 views

Getting “This org appears to have a problem with its OAuth configuration. Reason: invalid_grant - expired access/refresh token ” error in VS Code SFDX

From today, Suddenly, I started getting the below error in VS code whenever I am running any SFDX command: ERROR running force:source:retrieve: This org appears to have a problem with its OAuth ...
0
votes
1answer
28 views

How to call public method of sibling component LWC

DO i need to use message Channel to call public method of sibling components?
0
votes
1answer
32 views

Creating custom dependent picklist field in LWC

I have a picklist field which I am fetching using wire. Now the scenario is I have to fetch all the records of the selected picklist value and show the values of one of the field in records in another ...
1
vote
1answer
26 views

LWC: Is it possible to store part of the schema string to import in Custom Metadata

I want to store the fields that need to be imported from the schema in my LWC in Custom Metadata. So for instance I want to make the following line dynamic: import MY_OBJECT_ID_FIELD from '@salesforce/...
2
votes
1answer
24 views

Best practice for distributing LWC lightning app in managed package

I am distributing a managed package which includes a lightning app built with LWC. In my dev org I needed to enable My Domain to get it to work. I've tested installing my package on an org without My ...
-3
votes
0answers
43 views

How to do EDIT and VIEW the record in datatable in lwc? [closed]

Row action in lightning with View and Edit record in lightning datatable in lwc.If I need to edit there record by using apex because of Look relationship with two objects I need to take record id and ...
0
votes
1answer
31 views

LWC querySelectorAll is not working

I am trying to iterate Student name as a button on click of button i need to show the students details below. For this, by default i kept the button class as slds-button_neutral on click of any of the ...
2
votes
1answer
31 views

Unable to call apex method using wire service, returning the result as [Object][Object]

<lightning:card> <lightning-button variant="brand" label="New Entry" title="Open Modal" onclick={openModal} class="slds-var-m-left_x-...
0
votes
1answer
20 views

Geeeting particular value from json and store in one variable

I need to get a particular value from the JSON and store it in the variable in LWC is there any way I can do it: asd==[ { "ABC":"ytyffy98948", "custui":&...
-1
votes
1answer
29 views

LWC returning array

Hi i need to search and filter out all the values from the array with the help of the user input as a key , i am trying to use filter but not getting anything kindly help me out: this.valueFromUser='...
0
votes
1answer
22 views

LWC HTML not rerendering after object change NOT Solved

I am having a similar issue as the one linked at the bottom, it looks like the answers are claimed to work, however I cannot seem to figure out wth is wrong with my code that seems to be very similar. ...
0
votes
0answers
25 views

LWC: how to get field values from the Related tab (without apex)

how can I access the Medias Request entries values from the Related (highlighted) area in a object entry? using LWC (without apex classes) import { LightningElement, api, wire, track } from 'lwc'; ...
0
votes
1answer
13 views

LWC - Alternate Button Icon in lightning-datatable based on results

How do I conditionally alternate a button icon displayed through a lightning-datatable? I would like to change the button icon based on data coming from the Apex method? The AccountContactRelation....
0
votes
1answer
15 views

getting value in Javascript from HTML [closed]

Hi I need to obtain a particular table value from UI HTML to Javascript: kindly help me out Here is my HTML: <template if:true={cOopyu.Acc}> <div> <a href='javascript:void(0);...
1
vote
1answer
23 views

Dynamically update get property value in LWC

Scenario: I am passing an array from parent LWC to child LWC and looping over it in child component. In child LWC, when a button is clicked, I am trying to add an item at the beginning to the array, ...
0
votes
1answer
24 views

LWC: CallBack list doesn't show on lightning-layout

I want to make a LWC which input keywords and show the results on list using lightning-layout & lightning-layout-item. And I want to make it that doesn't depend on SObjects. Now, I have a problem ...
0
votes
0answers
15 views

Ensure Flow passes updated value to LWC component when navigated back/forth

I have a picklist component in screen1 which shows various drop down options. When a user selects an option and clicks next, multiple queries are executed on different object where name equals to the ...
0
votes
2answers
22 views

How to make page layout dynamic based on dependent picklist fields?

I have a scenario that based on few dependant picklist fields, the page layout/fields in the page layout gets changed. Is it possible to do it using any declarative method or dynamic forms or flows or ...
0
votes
1answer
16 views

Timezone for “Date” Field should be set to 'Australia/Melbourne'

I need help from experts for a lightning data table with 'Date' type field. I want to strictly set it's timezone to 'Australia/Melbourne' irrespective of user's local timezone. For example, Even if an ...
1
vote
1answer
24 views

How can we override standard button on standard objects like Contact with a Flow

I am trying to launch a flow from the standard new button on the contact, I know we could override standard buttons with Visualforce and lightning components but is there any way to override to ...
0
votes
1answer
28 views

Hiding dates earlier than today on lightning-input field

Is there way to grey out the dates which are less than today using a simple <lightning-input type="date" name="input1" label="Enter a date" ></lightning-input>...
0
votes
1answer
25 views

Hide “Or drop files” for file lightning-input

I have a lightning-input with type file so I can upload files. I don't want the little box that says "Or drop files" that shows up beside the upload button to show. Is there a way to hide ...
0
votes
0answers
16 views

Insert multiple child records after inserting parent record using record edit form

I am creating a parent-child relation form using record-edit-form in LWC. Here is the object relationship. Finance (One to Many) Cash Finance (One to Many) Stocks So for one Finance record, you will ...
0
votes
1answer
25 views

Control Lightning page tab visibility based on profile

I have added a new component tab named 'Level' on the lightning page. But i want this tab to be visible only to one specific profile. Is there a workaround to implement this???
0
votes
1answer
30 views

Want to implement Zoom Image in Lightning Web Components, is any component available? [closed]

I want to implement the image zoom feature in Lightning web component. Following is my code, its not executing. <div class="imgZoomContainer"> <img src = {displaySelectedImg} id=&...
0
votes
0answers
31 views

Lightning Web Component Superbadge - Step 8 Help [closed]

Really need help on step 8, I'm getting the error "We can’t find the proper settings for the boatTile instances in the component boatSearchResults. Make sure the component was referenced ...
0
votes
1answer
47 views

Lightning Web Component - Combo box - populate value from Wrapper Class

I am trying to populate a list of contacts from the Wrapper class.However, I am not getting any values to display in the Combo box. Here are my codes Apex Controller Class: public with sharing class ...
0
votes
0answers
26 views

Not able to create Contact using Sites in Salesforce using LWC

I have created a public Site and given permissions for the guest profile with Create and Read for both Account(Only Read) and Contact. Then I have given OWD as Public Read/Write for Account and ...
0
votes
0answers
21 views

Lightning datatable refresh not working [closed]

HTML <template> <lightning:card> <lightning-button variant="brand" label="New Entry" title="Open Modal" onclick={openModal} ...
0
votes
0answers
15 views

LWC Showing Related fields in Lighting Datatable [duplicate]

Is it possible to display related fields in a lightning-datatable in LWC? For example, I want to show the recordtype name. I am querying RecordType.Name in the Apex. When I set the columns in my ...
1
vote
2answers
28 views

Can you use lightning-file-upload without saving?

In LWC, is it possible to use the lightning-file-upload component without saving the file to a ContentDocument? I am going to be uploading it to another server via an API and don't need/want it saved ...
0
votes
1answer
21 views

lightning-output-field not displaying anything

HTML: <template if:true={showDates}> <lightning-record-view-form record-id="recordId" object-api-name="CC_Case__c"> ...

1
2 3 4 5
73