Skip to main content

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
1 answer
41 views

How to get a lightning-datatable's width correctly setup for horizontal scrolling?

When a related list is configured in a page, the table showing the related list values starts with this markup: <div lwc-392cvb27u8q="" class="slds-scrollable_y" style="...
Keith C's user avatar
  • 137k
0 votes
1 answer
26 views

how to fetch the details of selected rows from a lightning data table when we have multiple lightning data tables availabe in lwc

I have 2 lightning data tables in my LWC. Under those tables, I have 2 buttons respectively. With one click of a button, I want to fetch the selected rows of the targeted lightning data table. I was ...
Gaurav Sharma's user avatar
0 votes
0 answers
23 views

Controlling CSS on Hover in Lighting Datable Inline Edit Mode

I have been able to dynamically change the background cell color in a Lighting Data Table using cellAttributes and a fieldname e.g. else if (attendeefields.fieldValue === 'Attended') { ...
BritishBoyinDC's user avatar
1 vote
0 answers
87 views

Collapsed column headers in LWC [Winter'25]

While doing a regression test in a Winter'25 sandbox, I found this issue. This is what the header should look like: And this is what it looks like in the sandbox: The HTML code for this element: <...
Sander de Jong's user avatar
0 votes
0 answers
22 views

Lightning Data Table Rows are Hiding Picklist Custom Data Type Dropdown Menu

I am trying to implement a new lightning data table LWC, and I want to add a few picklist custom data types to some of the table cells. The picklists render correctly. However, the dropdown menu for ...
Daniel Fuller's user avatar
0 votes
0 answers
70 views

Create a custom data type for lightning tree grid LWC

I am planning to use the Lightning Tree Grid component in my LWC. But there are a few columns which are to be represented differently than the standard types available. Now it is possible to create ...
Chandrashekaran's user avatar
0 votes
1 answer
55 views

Custom Input data type in data table and Inline editing

Custom datatype in LWC datatable, Customizing the Quantity field as a custom input data type and the Price field for inline editing. When attempting to change the Quantity value, the value is captured,...
SK2889's user avatar
  • 929
0 votes
0 answers
42 views

lightning-datatable summer '24 behavior (2 icons in standard cell, edit icon)

We have an extended lightning-datatable in our org that was built by some consultants many years ago. in Summer '24, we had this issue : Behavior of draft-values tag in a lightning-datatable changed ...
Carryonplease's user avatar
0 votes
0 answers
51 views

How to remove "Update xx selected items" out of Custom Datatable - Lightning Datatable

I have created a custom Datatable to use Combobox, it works fine, but when I select the picklist value of row is ticked checkbox, it is showing the section contains "Update xx selected items"...
Tran Xuan Hai's user avatar
0 votes
0 answers
29 views

Lightning data table not displaying data

Lightning table data is not displaying Apex controller public class SfdcSupplierTaxController { @AuraEnabled public static List <Tax_Registration__c> getRecords(String accountId) { List&...
Vanitha Mani Vlog's user avatar
1 vote
0 answers
12 views

Triggering Cell Change when using a component as the editable Custom Type in Lightning Datatable

A while back, I was able to get the custom picklist type to work in a Lighting DataTable To do that, the template contained a combo box with this markup: <lightning-combobox name="picklist2&...
BritishBoyinDC's user avatar
1 vote
1 answer
159 views

Lightning-Datatable column header tooltip and icons

Is it possible to add in icons to the headers of the LWC Lightning-Datatable? Barring that, is it possible to add a tooltip to the header? I already have many custom column cells, but I haven't been ...
Kevin Yao's user avatar
  • 159
1 vote
1 answer
77 views

Lightning datatable display data from apex controller

I am testing lightning datatable with a simple controller. @AuraEnabled(cacheable=true) public static CustomObject__c getMyCustomObject(String contactId){ try { system.debug('contactid:' + ...
Mahmood's user avatar
  • 5,976
0 votes
1 answer
22 views

Salesforce get Draft and other row data

Is it possible to get the Draft value and other row data values in a datatable when a user updates a cell? event.detail.draftValues[0] only returns the value being updated I want to determine if its ...
Phuc's user avatar
  • 373
5 votes
1 answer
107 views

Will there be a responsive datatable component soon?

This Reddit post Responsive Design for Datatable in LWC or other UI Suggestions? includes this quote with no links or details: The salesforce data table was just redesigned to be responsive. The ...
Keith C's user avatar
  • 137k
0 votes
1 answer
151 views

Add rows to a datatable

I have been working on a lighting data table and have now been able to edit the data table values and when saving create new records. My question is, can you add a row to a data table? I read where ...
Phuc's user avatar
  • 373
0 votes
0 answers
74 views

Extended Datatable - Custom picklist dropdown is being hidden

I'm working on a inline editable LWC Datatable where I have a multi-select picklist column (Followed https://techdicer.com/multiselect-picklist-in-lwc-datatable-inline-edit/) . The dropdown values are ...
vandanasridatta's user avatar
0 votes
1 answer
45 views

lightning-datatable Fieldset Editable

I have an LWC lightning-datatable that I am populating using a field set. When I go to the datatable the fields are not editable. Is it possible to make the fields editable so that I can save all the ...
Phuc's user avatar
  • 373
0 votes
2 answers
60 views

Lightning-datatable column value overflowing into the next column

Some items of the Part Name column go beyond its configured column width. In the snippet provided, the first item is displayed as expected. However, the value of the second item is overflowing into ...
Sumesh's user avatar
  • 39
5 votes
0 answers
76 views

Widening the popover for a lightning-datatable editable custom data type to allow a lightning-dual-listbox

The Make a Custom Data Type Editable documentation provides an example of an editable table cell custom type and that example works well. I'd like to use a Dual Listbox for one column in a table but ...
Keith C's user avatar
  • 137k
0 votes
0 answers
65 views

Wrap text drop down on lightning:datatable not rendering properly

When i click on the drop down in my datatable the wrap-text/ clip text drop down opens inside the header and not over the header This is the code for Data table: <div class="data-table slds-...
Somyak Simant's user avatar
0 votes
1 answer
75 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
  • 137k
4 votes
2 answers
369 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
3 votes
1 answer
365 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
  • 137k
1 vote
1 answer
90 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
  • 39
0 votes
0 answers
73 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
  • 63
0 votes
1 answer
235 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
  • 63
1 vote
1 answer
91 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
  • 500
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
  • 63
1 vote
0 answers
71 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,851
0 votes
0 answers
42 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
210 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
201 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
314 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
683 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
221 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
68 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
104 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
306 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
539 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
227 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
83 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
  • 432
0 votes
1 answer
121 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
96 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,851
-1 votes
1 answer
174 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
  • 680
5 votes
1 answer
247 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
198 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
88 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
60 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
242 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

1
2 3 4 5
15