3 votes

LWC: How to make DIV fit with mobile view

from the docs - Create Responsive Layouts you can use the *-device-size property to change the size depending on the viewport. Example: <lightning-card> <lightning-layout multiple-rows&...
  • 19.5k
2 votes
Accepted

Metadata API 'Quick Action' - Required fields are missing: [Component] (REQUIRED_FIELD_MISSING). Fields Component

You need to add type info for all the newly added parameters and also add then in the order info array.
  • 38
2 votes
Accepted

How to reduce array and add related integers together

I think that the best approach would be first doing all the sums, and the formatting as you like Object.entries( input .reduce( (prev, current) => ({...prev, [current....
  • 750
2 votes

Unable to get Map as return value from Apex in LWC using Imperative Call

The problem is that you iterate through the map in the wrong way. Try something like that: const results = { Agriculture:'Agriculture', Apparel:'Apparel', Banking:'Banking', Biotechnology:'...
  • 1,347
2 votes
Accepted

How to get mouse position?

You have several problems. PageX and PageY should be pageX and pageY. JavaScript is case-sensitive. Further, we typically put hovers next to an element, not right on the mouse cursor. This causes ...
  • 445k
2 votes
Accepted

LWC select element with multiple

You can read the options directly from the element: let selected = [...event.target.options].filter( (option)=>option.selected ).map( (option)=>option.value ); This also means you don't ...
  • 445k
2 votes

How to get count of opportunities related with an account in SOQL query?

You can only use aggregate expressions in root Queries. for getting the count if opportunities on each account you have to use the below SOQL query. SELECT count(id), AccountId FROM Opportunity GROUP ...
2 votes
Accepted

LWC - Pass event to Aura Component

try sending your data using the detail property on the event's payload, something like this: const selectedEvent = new CustomEvent('testevent', { detail: { testMessage: 'Hi there' }}); instead of ...
  • 500
2 votes
Accepted

LWC Code not displaying data

You have used this : getAccounts().then(function(result){ console.log(result); this.accounts = result; }).catch(function(error){ console.error(error); }); } You need to ...
1 vote
Accepted

How to hide column in Datatable LWC?

You can do something like that: const fieldsToNotDisplay = ['IncidentSuivi__c']; this.fieldsForCloumn = items .filter(field => !fieldsToNotDisplay.includes(field)) .map(field => (this....
  • 1,347
1 vote

Lightning Web Component Action not showing up on community page

In the release notes that delivered this feature Release Notes This change applies to Lightning Experience desktop in Developer, Enterprise, Essentials, Professional, and Unlimited editions. Quick ...
1 vote
Accepted

Filter and Slice in LWC Array

this.fieldToUpdate = this.fieldToUpdate.splice( this.fieldToUpdate.filter( (key) => key !== event.detail.name, (value) => value !== event.detail.realValue ), 0 ); I ...
  • 445k
1 vote

Selected Date Field wont stay on page after clicking out of field

Set showDatePicker = "false" should work. Setting showDatePicker = "true" is defaulting the date format to dd/mm/yyyy format which doesn't conform to HTML5
1 vote

LWC select element with multiple

you want to avoid having to query the DOM to get selected values, instead, try updating a property within an array, or adding selected values to an array in your controller, and fetch the values from ...
  • 19.5k
1 vote

LWC: How to make DIV fit with mobile view

I will add important details for the answer provided by @glls. Documentation for layout-item If you specify the small-device-size, medium-device-size, or large-device-size attributes, you must also ...
1 vote
Accepted

Hi Small help, can any one suggest me on this

You cannot use relationships as value. Your data structure should be plain. The easiest way to do something like that is: this.opportunities = data.map(opportunity => ({ ...opportunity, ...
  • 1,347
1 vote
Accepted

alignment issue with lwc

Did you try something like that? <tr key={rec} class="slds-hint-parent row"> ... </tr> .row { display: flex; align-item: flex-start; }
  • 1,347
1 vote

LWC lighting-map not showing custom icons

Not sure why but in me based on your code I see custom star icon based on your SVG. Do you see a different icon, or it might be a caching issue? Unrelated information: Setting lowering zoom level ...
  • 18k
1 vote

Implement three state checkbox using LWC

As of now, no direct attribute/property for indeterminate is available for the lightning-input component as per the component library. There was however mention of an indeterminate state in the SLDS. ...
  • 2,901

Only top scored, non community-wiki answers of a minimum length are eligible