Questions tagged [web-components]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
4
votes
1answer
2k views

When to use Slots vs Public Properties vs Getter Properties in LWC exactly?

I am learning LWC and I understood the concept of Slots & Public Properties. But I am not clear regarding when, in which conditions should we use Slots, Public Properties (@api) and Getter ...
4
votes
1answer
3k views

When can I extend custom component in LWC?

As a general implementation guidelines of LWC, we should be extending standard LWC elements. Examples are: export default class MyComponent extends LightningElement (Most used) export default class ...
3
votes
1answer
1k views

Lightning Web component and Aura component performance difference due to the change in architecture

I am new to salesforce lightning web component.I did some of the example and found that lightning web component is way more faster than Aura component. This is due to the web stack architecture of ...
3
votes
0answers
257 views

Pass data to web component (angular 6) inside LWC (Lightning Web Component)

I have Angular 8 app defined as web component and I have Lightning Web Component (LWC) app. Inside LWC I am trying to pass data into web component through the property of DOM element like this....
2
votes
1answer
104 views

Is it possible to export a Salesforce-hosted Lightning Web Component for consumption as a Micro Frontend?

A colleague was giving a very exciting presentation on Micro Frontends today. He explained that if you can import the web-components into your JavaScript, you could compose your UI using components ...
2
votes
0answers
27 views

How to make lightning-layout-item grow horizontally or vertically or both?

I'm trying to create a flexible layout using lightning-layout and lightning-layout-item base components in LWC. The screenshot of the basic idea is given below. Appreciate inputs on how can we achieve ...
1
vote
1answer
1k views

How is the <template> tag used in lwc different from one used in web components?

According to usage of <template> in web components: The elements under template won't appear in your page until you grab a reference to it with JavaScript and then append it to the DOM For ...
1
vote
1answer
275 views

WebComponents.dev for Lightning Web Components: How to?

We are now seeing the following message at the top of the Lightning Web Components Playground: Playground will be retired on February 1, 2021. All saved projects will be permanently deleted at that ...
1
vote
1answer
56 views

Get picklist values on record type(not a default) without hard-coding of record type id and object have more than one record type in Salesforce

I have a scenario where i have LWC component A and in its html it uses LWC component b (In this LWC component i have built the picklist dependency + record type). So that in component A in HTML i ...
0
votes
1answer
212 views

How to get unselected rows from Lightning Datatable?

I'm trying to get the list of selected rows with onrowselection event. <lightning-datatable key-field="index" ...
0
votes
1answer
1k views

Sending Wrapper object to Apex from Javascript in LWC

I have a question regarding the operation of the wrappers classes in lwc. I have an apex method which has as an input parameter an object of the wrapper class. FIRST IMAGE: SECOND IMAGE: The ...
0
votes
2answers
625 views

Cannot add a class to body tag in lwc

I am trying to add 'overflow: hidden !important' property in body tag of lightning page. For this, i did the following document.body.style.overflow = 'hidden !important' Unfortunately, it didnot ...
0
votes
0answers
23 views

how to manage translations in salesforce for the application running outside salesforce? [duplicate]

We are developing an application that will be deployed on a web platform.The backend data is stored in salesforce and what we would like to do is to support multi lingual app. Is there a way where the ...
0
votes
0answers
94 views

Google translation widget in lightning web component

how can i implement google translation widget in Lightning web component i have tried import { LightningElement,track } from 'lwc'; import JqueryPlugin from '@salesforce/resourceUrl/jqueryFile'; ...
0
votes
1answer
384 views

LWC is not working with non-admin profiles

I have created a web component to pre-populate child record fields from parent record, its working fine when i tested as a admin, but its not working when I logged in as other profiles, I'm not using ...
0
votes
0answers
236 views

In Salesforce LWC lightning-datatable unable find the current selected or un selected record

In Salesforce LWC lightning-datatable unable find the current selected or un selected record As per documentation "onrowselection" call back always giving records which is selected. I need to fetch ...
0
votes
0answers
40 views

How to convert LWC pages into PDF format? [duplicate]

My current requirement is to convert LWC page into PDF format. I tried built in 're-render as PDF' option though VF page. But it does not look good & i am not able to add Graphs/Charts into it. ...