Questions tagged [lwc-oss]

Lightning web components OSS, referred to as Lightning web components Open Source is a framework that allows building custom elements with HTML, JavaScript, and CSS. Lightning Web Components uses standard HTML, modern JavaScript (ES6+), and the best of native Web Components and can be used to build web apps on or off (ex website hosted on Heroku/Netlify or PWA app hosted outside Salesforce) Salesforce platform.

Filter by
Sorted by
Tagged with
0
votes
1answer
37 views

Parsing JSON string value returned from APEX in LWC

I am receiving JOSN string in the following format {"data":{"meta":{"resultCode":null,"message":null},"data":[{"code":"$RFG","...
0
votes
2answers
75 views

LWC : onchange Handler not getting fired when @track attribute is changed

I have two lightning input in a simple LWC component having respective onchange handlers and being @tracked with respective attributes. Second onchange handler is getting fired when I update second @...
1
vote
1answer
34 views

LWC Build Files Explaination

I have been trying to research this on my own, but I can't find a simple explanation that tells me the difference between the following 2 files: lwc.config.jsonhttps://developer.salesforce.com/blogs/...
2
votes
1answer
56 views

LWC OSS - Can I use an component I build in LWC OSS within Salesforce?

I am likely not understanding some parts of the potential of LWC OSS but is it possible to built an application/ component in LWC OSS and then utilize it within Salesforce. Or is this only for ...
0
votes
2answers
77 views

How to Show/Hide button based on Profile in Salesforce LWC?

I have develop LWC component which is normally used by normal users. In that lightning web component button is there as below. <lightning-button slot="actions" label="Deactivate"...
0
votes
1answer
53 views

Call API from LWC OSS

I created an LWC OSS app with express server using npx create-lwc-app: Do you want to use the simple setup? Yes Package name for npm demo-app Select the type of app you want to create Standard web ...
1
vote
1answer
60 views

Is it possible to use LWC-related npm modules & webpack to leverage the LWC framework with Cloudflare Workers?

I am hoping to use the LWC framework with Cloudflare Workers in JavaScript, but running into some issues. It seems like Wrangler ignores node_modules so I was hoping to use webpack in order to load ...
2
votes
1answer
34 views

How to Customize Base Components?

I want to use a custom icon with a button. The standard lightning-button could not be used because it does not support custom icons. So I looked into the base-components-recipes repository as the docs ...
0
votes
1answer
35 views

How we can achieve navigation to another page in LWC OSS?

I created my first app using LWC OSS. I want to achieve the navigation from one page to another (url in the browser should change) I have two files created in LWC OSS app first file at src/client/...
1
vote
2answers
71 views

LWC OSS Import External Google API's

I am trying to utilize Google API's in a LWC component. I am able to do a fetch in my component to a hosted API endpoint that utilizes the google API's and returns a list of Google Drive files via ...
2
votes
1answer
111 views

How to configure Socket.io to work with LWC OSS?

I am trying to use socket.io library with LWC OSS and followed the below steps: Created LWC OSS app using the command npx create-lwc-app my-app Installed socket.io library using the command npm ...
2
votes
1answer
38 views

In LWC OSS what is this.allsession while assigning to arrya

I am learning LWC OSS and in the trailhead, I am unable to understand, the use of this.allSessions in the below code while assigning the result to the array variable of "sessions = []" ...
1
vote
1answer
67 views

Unable to use lwc:dynamic directive in LWC component

How do I enable the lwc:dynamic directive or is it tied to certain release of Salesforce?
0
votes
1answer
40 views

LWC OSS Build Command

I'm trying to build an LWC OSS project for production, but I can't figure out where the 'npm run build' command builds the bundled resource. I don't see anything obvious in the configs or on either of ...
5
votes
1answer
441 views

Lightning Open source use of base components

A few days back an npm package for base lightning components was released Base Lightning Components With this I am expecting to use base lightning components like my favorite lightning-datatable in a ...
0
votes
1answer
58 views

Query Selector is not working when I am putting inside renderedCallback Lifecycle hook in Lightning Web Component

I am creating a variable crashride and doing querySelector inside renderedcallback then I am using that variable inside another function. But if I directly say this.crashride inside the function ...
0
votes
0answers
263 views

JSForce GET Request Issue

I am using a LWC Open source app to make a GET request to my Salesforce Org. I want to get the resource at : https://na111.salesforce.com/services/data/v42.0/sobjects/EventLogFile/0AT3h00000PE85uGAD/...
0
votes
0answers
84 views

new XSLTProcessor() fails in lwc

I am playing around a bit with lwc and the open-source version of it. I tried to copy my open source lwc component into my saleforce project but now I am getting an error message that does not really ...
3
votes
2answers
1k views

LWC datatable Header wrapping

I am working on a LWC component where in a lightning datatable I have more than 7-8 columns. When I add the component into detail section of a record page, the headers of the table is getting ...
2
votes
1answer
258 views

LWC OSS cannot find ui-card component

I am looking at the open source LWC recipes and whenever I try to add a template to app.html which references ui-card, I am hitting a compile error. I saw that this issue has come up before from ...
5
votes
1answer
271 views

Inconsistencies between shadow dom and synthetic dom on LWC OSS

We've been working on porting our LWC components from platform into LWC OSS. In order to do this, we have a copy of SLDS classes we have created and we need them to be applied globally. For us will ...
3
votes
1answer
251 views

OSS LWC app on Heroku Css Fails to load

I am trying to run an OSS LWC app on heroku using SLDS via synthetic shadow dom. When I run it locally using heroku local web everything looks great. When it makes all the way to my Heroku site, I ...
4
votes
2answers
852 views

How to @wire an external Rest API call with LWC OSS?

I have created a basic project and simply want to pull a list of greetings from Google Firestore instead of using the default static array of greetings. My greeting.js file looks like this: import { ...
2
votes
0answers
181 views

Adding Service Worker to LWC

How do we add a service worker to an LWC local application? I am trying to add a service worker to an LWC application. I have added the sw.js to the project but it shows an error while registering ...
4
votes
1answer
1k views

Normalizing Boolean values in LWC

Looking at LWC e-bikes sample gallery, I found these comments in code regaring normalizing values. Can someone refer to what they have meant or how to do this normalization using best practices? ...
9
votes
2answers
2k views

lightning-input firing two onclick events in Lightning Web Component

I am receiving two events when I am clicking lightning-input checkbox. This behavior is the same in Salesforce as well as on the LWC playground. Wherever if use html checkbox then I receive event ...
2
votes
1answer
240 views

routing or dynamic creation of LWC Open Source components to avoid multiple IF conditions

we are working on LWC Open Source and to navigate to the new component, currently we are using if:true with a boolean value which is not appropriate for a long run. Is there any other way to achieve ...
5
votes
1answer
618 views

Lightning Web Components - Custom Decorator support

Part 1 - Custom decorators blocked in LWC I'm trying to implement a custom decorator, very simple book example but getting LWC error in both LWC open source and LWC for salesforce, LWC1100: Invalid ...
1
vote
1answer
250 views

How to view new LWC?

I want to play around with the new Lightning Web Component announced earlier today. I have Node.JS downloaded and I'm running a local server, but I'm unable to see anything at the address '0.0.0.0:...