Skip to main content
New
Stack Overflow Jobs powered by Indeed: A job site that puts thousands of tech jobs at your fingertips (U.S. only). Search jobs

Questions tagged [lightning-datatable]

A table that displays columns of data within lightning experience, formatted according to type. This component requires API version 41.0 and later.

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

lightning-datatable inline editing - text only?

Is it correct that the standard lightning-datatable inline editing only offers a text field? There is no way to e.g. make the editing control a picklist using that component? If the above is wrong, ...
Keith C's user avatar
  • 136k
2 votes
2 answers
95 views

Behavior of draft-values tag in a lightning-datatable changed in Summer'24

I have a Lightning Web Component that is feature-rich, so to say. 250 lines of HTML and 1350 lines of JS. Due to these sizes, I cannot list the complete source. One of the things that it uses is this ...
Sander de Jong's user avatar
2 votes
1 answer
59 views

A lightning-datatable with the rows and columns transposed?

A lightning-datatable has columns that can have varying data types so a column can represent a record field and a row an individual record. I have a need for the opposite: a column per record and a ...
Keith C's user avatar
  • 136k
0 votes
0 answers
37 views

How can we capture the event when the pencil icon is clicked in an editable data table in LWC? [closed]

I have requirement in which a lightning Editable Data table(used inline editing) is implemented using below sample code from Salesforce documentation- import { LightningElement } from 'lwc'; import ...
Kapil Saini's user avatar
1 vote
1 answer
39 views

Problem with selecting row checkboxes when inline editing is done

I have a LWC lightning datatable and I am giving the users two options to select rows. One is by clicking on checkbox at the start of the row and the other is when a user edits a cell of a row which ...
Sumesh's user avatar
  • 11
0 votes
0 answers
33 views

Picklist options are not showing in the LWC Datatable

I kindly request don't mark it as a duplicate. my html code: <template> <lightning-card title="Opportunity Line Items"> <template if:true={...
Sridhar's user avatar
  • 49
0 votes
1 answer
51 views

Picklist values are not showing in the LWC Datatable

Here I'm creating custom type Datatable here which extends standard LWC Datatable. Also, creating an extra HTML file customPickList.html, customPickListEdit.html so we can put the Picklist Combobox ...
Sridhar's user avatar
  • 49
1 vote
1 answer
65 views

Why are value and options not populating in a custom dataTable combobox column edit template?

I'm defining a custom column for a Lightning dataTable component to hold a Lightning combobox like this: { label: 'Down Payment Type', fieldName: 'DownPaymentType__c', type: '...
isherwood's user avatar
  • 478
0 votes
0 answers
17 views

Product name is not displaying in my lwc datatable [duplicate]

My requirement is that i need to edit opportunity line item in one page using LWC Datatable. My apex controller class: public with sharing class OpportunityLineItemController <br>{ <br> ...
Sridhar's user avatar
  • 49
1 vote
0 answers
30 views

Display 6 decimal places in flow data table

I have a Flow that extracts data via an Apex call into a record collection in the Flow. This collection then displays in a data table for the user to verify and to select any they might want to omit ...
Irene's user avatar
  • 1,839
0 votes
0 answers
16 views

How to render the label of a lightning-button in a lightning-datatable but disable the lightning-button onclick functionality itself?

This is linked somewhat to the questions here and here. I have a lightning-datatable that has a column that is a lightning-button which, when clicked, invokes a lightning-modal. The UX behavior that I ...
Andy Hitchings's user avatar
1 vote
1 answer
90 views

How to invoke lightning-modal from a button in a lightning-datatable?

I want to invoke a modal from a button click in a lightning-datatable that will display the contents of the account description (because this can sometimes be a large amount of text that renders in a ...
Andy Hitchings's user avatar
0 votes
0 answers
36 views

Change color of Edited cell in lightning-datatable LWC

May I know How to change the background color of edited cell in lightning-datatable ? By default when we edit an editable cell in lightning-datatable it highlights in Yellow. I want to change this to ...
HarshVardhan Gowda's user avatar
3 votes
1 answer
95 views

How to dynamically color a cell on a lightning-datatable on a LWC?

I am displaying a survey response table on a custom object and wish to dynamically color a cell based on the survey response answer. Ultimately I will want to have multiple answers to check for, but I ...
Zack Gibson's user avatar
1 vote
1 answer
66 views

How to set the width of a specific column on a lightning-data table inside of a LWC?

I am displaying a table on a custom object and wish to set the width of each column in the table. There are only 3 columns. Here is my HTML inside the LWC that displays the table: <template> ...
Zack Gibson's user avatar
1 vote
0 answers
65 views

Unable to use format style 'percent-fixed' on Lightning Datatable

On Lightning Datatable I'm trying to use a column of Type percent or number with the typeAttribute formatStyle:'percent-fixed' to prevent the value from being multiplied by 100. As per the datatable ...
cestol's user avatar
  • 11
1 vote
1 answer
40 views

lightning-tab embedded LWC data table issue

I am working to embed an LWC into a lightning tab format on the Interaction__c record page I have custom components on. The HTML for the lightning tab: <lightning-tab label="Payment ...
ForrestFairway's user avatar
0 votes
0 answers
55 views

LWC lightning-badge in cell of lightning-datatable

I am trying to place one or more lightning-badges inside the cells of my lightning-datatable. I've been successful in using icons instead of cells, but I haven't been able to find a solution for ...
user3643040's user avatar
0 votes
1 answer
93 views

How to compute values in lightning-datatable when cell change

I am attempting to perform calculations when there is a change in a cell. Specifically, if the values of either Q1__c or Q2__c change, then I want to compute the value of First_Half_Amount__c (i.e., ...
Afrose ahamed's user avatar
0 votes
1 answer
192 views

How to fix or freeze a column in lightning data table

I have a lightning data table with lot of columns specified. First column in the table is called Product and there are other columns. In order to update other columns user has to scroll the table for ...
Sudhir Balijepalli's user avatar
0 votes
1 answer
132 views

Refreshing LWC Datatable using notifyRecordUpdateAvailable

Looking for some help to see what I'm missing here. After inline editing the records in the datatable relating to this js file, the records update successfully but the datatable is not refreshing. ...
mcg123's user avatar
  • 71
0 votes
0 answers
69 views

Checkboxes in the rows of lightning-datatable frozen

I have a simple lightning-datatable in a lwc component. Here am trying to select and deselect the checkboxes for the first two row, which unfortunately seems frozen and doesn't allow me check. ...
Aditya M's user avatar
  • 420
0 votes
1 answer
86 views

LWC Datatable with OpportunityContactRole 'Role' picklist

I'm trying to display a list of Opportunity Contact Roles within a datatable. I'm having trouble showing the 'Role' field as a picklist. Does anyone know what I'm missing? I've wired in the ...
mcg123's user avatar
  • 71
0 votes
1 answer
63 views

LWC Object.assign dot notation throwing error - need to use name field in datatable

I am using a datatable in a custom listview LWC component and need to display the lookup fields as urls. I'm trying to flatten the results in order to use the dot notation for a lookup on the Account ...
Irene's user avatar
  • 1,839
-1 votes
1 answer
61 views

how to show tool tip on lwc datatable cells

I have lwc datatable, I am able to add button on cells where needed. Similarly I wanted to show info icon with tool tip, Tool tip will show dynamic information based on table record data. Any guidance ...
Ankuli's user avatar
  • 670
4 votes
1 answer
177 views

Error and Changes in Spring 24 to define Column type - Picklist with LWC Datatable

I have been trying for much too long to get a create a custom data type of picklist for an LWC table. I have read the standard docs about creating an editable custom type, and reviewed the many ...
BritishBoyinDC's user avatar
0 votes
0 answers
111 views

How Can I display my Current value into Bold in lightning-datatable in LWC

I am trying to create a Custom Account Hierarchy Therefore I need to indicate my Current record in LWC. I am trying to make the 'Current' word Bold only but it is not working. Please advise any ...
Umer Aziz's user avatar
0 votes
0 answers
68 views

i am not getting the updated record in datatable after saving the inline edits in lwc

import { LightningElement, track, wire } from 'lwc'; import getAccountNames from '@salesforce/apex/fetchKidsClubsName.getAccountNames'; import getKidsClubRecords from '@salesforce/apex/...
Sridhar Nikhil's user avatar
0 votes
0 answers
35 views

Why is my LWC Datatable editable?

I have created a Lightning Web Component (LWC) that includes a Datatable. Despite setting 'show-row-number-column' to false, the column is still visible and not useful as only one digit is displayed ...
RMaas's user avatar
  • 1
0 votes
1 answer
175 views

Custom LWC datatable with custom datatype - lightning Combo box

I need help in getting the values in the parent component from the template which is called in child. In below code, onchange event is giving me the Id for the picklist value but not the cell id. how ...
Neophyte's user avatar
0 votes
2 answers
126 views

Lightning-datatable sorting throws "Cannot read properties of undefined (reading 'setAttribute')" error

I have a lightning-datatable that is defined so it can be sorted by a few different columns. This is the code: <lightning-datatable lwc:if={data} key-field="id" ...
joacoiudica's user avatar
0 votes
1 answer
526 views

Add image in Datatable of LWC

I am trying to add image to a datatable and i know that we need to use custom types. I am using this blog as reference. I have pretty much followed the blog but cant seem to get the images to display. ...
Prady's user avatar
  • 12.3k
-1 votes
1 answer
94 views

How to remove borders in aura tree grid

i have an aura tree grid table that looks like below I want to remove the lines between 2 rows i.e the borders of the table. I am able to do it using the inspect in browser and then unchecking the '...
Mayank's user avatar
  • 1
0 votes
0 answers
56 views

Hover popup expanding entire row of lightning datatable

I am trying to show User info on hover over Name field in datatable, which is resulting in expansion of entire row rather than just hover popup. Below is the code for datatable where I am using custom ...
getty's user avatar
  • 73
-1 votes
1 answer
83 views

Select entire text on inline edit in lightning datatable lwc

I am trying to select the entire text in the lightning input when I click on the inline edit (pencil) icon in the lightning datatable (LWC). Is there an event that gets fired when we click on the ...
Shanky's user avatar
  • 99
0 votes
0 answers
167 views

Create Header Actions dynamically in lightning Datatable

In the documentation provided by Salesforce on the 'Datatable' component we find the necessary instructions (see section 'Creating Header Actions') to create actions at header level. It is also ...
Tzinm's user avatar
  • 21
-2 votes
1 answer
1k views

How to display a checkbox field using lightning-datatable?

[ I have data of having a Boolean field. i want to show that in lightning-datatable as a Check box instead of Utility:check. like show in Image
Siddhesh Paratane's user avatar
1 vote
1 answer
122 views

Datatable inside tabset don't render content in first tab [duplicate]

I have a requirement where I need to dynamically format datatables inside tabs defined by a custom object used to assist in formatting my LWC component. My component has a wire function that calls a ...
Erick Petzold's user avatar
0 votes
2 answers
129 views

How to rerender a child component based on a change in JS array

I have a LWC that includes a child component, which displays a Lightning Datatable. On initial load, based on @api decorator property: tableData, the table renders with valid data. But, when we try to ...
SatyaV's user avatar
  • 1,523
0 votes
1 answer
388 views

LWC Conditional render to show a field in a data table if that field has value

I'm trying to show or not show the content of field in a data table depending on if it is null or empty etc. What am I doing wrong? <th scope="col"> <div lwc:if={isNotes}&...
Darrell W's user avatar
0 votes
0 answers
156 views

Unable to Display Records In LWC Datatable

i am unable to get data in LWC table even after condition "someCondition" is true on HTML template,but able to get the details in console log? can anyone help me in this?? HTML : <!-- ...
Sam's user avatar
  • 1
0 votes
1 answer
137 views

How to over come data table dynamic column duplicate issue?

I need to generate columns dynamically based on input target property component, But its making duplicate columns when you navigate to new record pages. <template> <lightning-...
Ragul's user avatar
  • 541
0 votes
1 answer
235 views

Delete in LWC lightning datatable is not working

I have a requirement to add Delete column for lwc lightning datatable, where I am able to display the Delete button. While clicking on the Delete button was not getting the recordid for the row which ...
getty's user avatar
  • 73
0 votes
0 answers
81 views

Salesforce Lightning DataTable - field calculations

I am working on simple lightning data table to show few columns. Users can edit the cell values and it will update corresponding fields based on certain simple calculations. For example, updating ...
Mitesh Sura's user avatar
0 votes
0 answers
120 views

custom lightning datatable inline editing : data cleared when changing picklist value

I am working on a custom lwc datatable, in order to add a picklist column, as the picklist is not a type for datatable column. the result is bellow. The last line of the table is added to the table ...
zaizousf's user avatar
1 vote
1 answer
229 views

Applying style to Custom Datatype in Lightning Datatable

I'm currently trying to apply colors to each of these icons within the datatable. I tried to use the cellattributes to change the color, but it seems that we're not allowed to use our own classes and ...
Kevin Yao's user avatar
  • 117
0 votes
1 answer
238 views

I have to insert an img using svg in 1column of datatable based on conditional rendering. How to have svg img in html from JS

I want to have SVG image in one column of data table along with it's data. Can't make any changes to HTML, so can't use IMG tag. I have SVG file as static resource. here's the code of HTML and JS HTML-...
SF Learner's user avatar
0 votes
0 answers
116 views

Auto-calculating lightning datatable columns based on input received

We have a lightning data table built in LWC, which has 2 columns - start date and end date. Start Date is going to be the first date of any month and the End Date would be the last date of the same ...
user136720's user avatar
-1 votes
1 answer
100 views

Empty LWC datatable after adding infinite loading

Can somebody take a look why my LWC datatable is empty after adding infinite scrolling? I feel that is small bug inside my code, but I am not sure where is it.. JS: //SHOW WORK ORDER RELATED ...
ApexNewbie's user avatar
0 votes
0 answers
359 views

How to add another table inside a datatable when clicked on a row - LWC

I have a requirement to open another table on click of a lightning datatable's row accordion.I already have the datatable code present in which I have used Basic Lightning datatable.Now the ...
Hira Khan's user avatar

1
2 3 4 5
15