Questions tagged [es6]

The tag has no usage guidance.

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

Unable to Close Drop down menu on Outside click in LWC

I am unable to close the dropdown menu in LWC on clicking anywhere else on the page apart from the dropdown menu . Please find the code below , HTML Code : <a class="userStyle" role="button" ...
0
votes
1answer
246 views

'set' on proxy: trap returned falsish for property 'id' — for an object in memory

I am getting the above error when trying to update a particular value of an object in memory. I understand I can not make changes to objects gathered from an @wire property. However, this should not ...
0
votes
1answer
77 views

why @track list doesn't rerender after value is changed?

i have a list of sobject that is retrieved from the db thanks a call to an apex method tha return the list, the list is retrived async with a the setInterval function . //this is the sample of the ...
0
votes
1answer
27 views

Any update about support for ES6+ on orgs with extended IE11 support

For SF orgs on which extended support for IE11 is enabled, this means that IE11 support is valid until 31 December 2020 (which is almost 1 year from now). Is there any update about possible support ...
0
votes
1answer
67 views

LWC merge objects

I want to merge objects dynamically. I have tried it but I didn't get the expected result let result = [ { Month: 7, OLIQU: 10, Year: 2018, AccountName: "Account1",...
4
votes
1answer
1k 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 ...
2
votes
1answer
659 views

import es6 from an extra javascript file in another component bundle in LWC

I think the documentation completely misses the case when you want to import an extra es6 module from another component bundle. Example, suppose we have the following folder structure. lwc module1 ...
12
votes
2answers
2k views

Feasibility to import entire LWC classes to access @api methods

I'm looking to modularize my LWC without having to embed them in the template. Ideally, would this kind of pattern be feasible? I'm not sure if it's my lack of ES6 knowledge (modules) or that LWC ...
7
votes
2answers
512 views

sfdx force:lightning:lint throwing a Parsing Error with ES6 syntax

I'm running the SFDX lightning linter on a lightning component as part of a pull request for my organization, but am hitting the following error: error Parsing error: Unexpected token > Line:57:...
6
votes
1answer
964 views

Using constants in Lightning Components

What is the correct way of declaring and using constants in Lightning Components. I am seeing different behaviours depending on organisations I am in. Basic way of having pass-by-value and ...
13
votes
2answers
1k views

ECMAScript2015 compatibility

As I understand it, the platform uses closure compiler to transpile code. And closure compiler officially supports ECMAScript 6 since 2015. But lightning-cli is configured to not allow version 6 or ...
8
votes
1answer
478 views

Salesforce-lightning-cli lint & ES6 const reserved word

I am currently writing lightning components and to do so I use Ecmascript2015 standard (Object.assign, const, let, ...). Everything works perfectly but the https://www.npmjs.com/package/salesforce-...
10
votes
2answers
1k views

Use of ES6 Default Function Parameter Value Spec in Lightning Components

Whilst doing some cleanup of some Lightning Components for Summer 16, I was creating a JS function in my helper. I had wanted to add some default values to that function using the new ES6 Default ...