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.
727 questions
0
votes
0
answers
29
views
modifying lwc property holding data from apex and removing rows, property does not update
Sorry for the confusing title.
I'm working on an lwc for a client that consists of two data tables. It's used to select assets. This client has over 10 million assets and needs to select multiple ...
0
votes
0
answers
22
views
How to conditionally disable actions on some rows in lightning-datatype (all rows are getting disabled in my attempt)
I want buttons enabled on some rows and not on others in a lightning-datatable. I tried the code below but the actions are disabled on all rows.
attendeeColumns = [
{ label: 'Name', ...
0
votes
1
answer
47
views
LWC Datatable showing timezone when modifying date field
I have a datatable with one column showing a date value. The value shown is directly retrieved from SF as a date, but when I click on it to modify it there's a time selector, which I don't want there. ...
0
votes
1
answer
119
views
Lightning Tree Grid: How to apply sticky header?
How to apply sticky header to the Lightning Tree Grid component? I was trying to use position: sticky; on the <thead>, but no luck so far.
I also tried multiple other things including using the ...
0
votes
1
answer
121
views
How to get the value of a cell in a lightning datatable?
I have a Salesforce Lightning Datatable showing different rates for a product depending on wheather you are paying monthly, quarterly, semi-annually, or annually. I would like to click on the ...
0
votes
1
answer
96
views
Floating Footer on LWC data table
I am not sure if this is possible. Already checked the documentation.
Is it possible to make the bottom footer of cancel and save as floating (docked footer).
Issue is if the list in data table is ...
0
votes
1
answer
111
views
Export filtered data-table data to CSV
I have a lightning data-table component in LWC. This data table features sortable filterable columns. I want to export the data present in the table to be exported in CSV excel format. Also ensuring ...
0
votes
0
answers
66
views
Lightning Datatable
In lightning datatable we have show-row-number-column. Is there any way to make it fixed/sticky as I scroll through right in the datatable
1
vote
2
answers
211
views
Datatable not refreshing data after records update and re-getting data
I'v seen many similar questions to the question I'm asking, but none of them seem to be doing things different than what I'm doing in my code, but I just cannot manage to get the table to refresh ...
0
votes
1
answer
104
views
How to Apply Custom CSS on Datatable
I am building a Datatable through LWC, the Last Column in my Datatable Should look like Exception Label : Exception Value, I want to exception Label as Bold, can someone help me
import { ...
0
votes
2
answers
236
views
LWC Datatable - remove Column Separator
I've a datatable built for Custom Types using extends LightningDatatable.
Datatable has resizable columns which will display column separators on the right side of each column header.
I want to make ...
0
votes
1
answer
94
views
Headeraction on Custom Type Datatable LWC
I've datatable implemented with Custom types.
I show rich text and image in my list of column and implemented JS with "extends LightningDatatable".
My columns below in demofile.js
const ...
0
votes
0
answers
194
views
How to freeze column jquery data table
In lightning-datatable, the freezeColumn feature is not available. I attempted to use a custom Lightning datatable, but I wasn't sure how to implement it effectively. As an alternative, I implemented ...
0
votes
3
answers
695
views
Clear selected rows of a lwc lightning-datatable
Here is how I have my lightning-datatable setup
<lightning-datatable
class="idealPartsList"
key-field="Id"
data={partsBetweenTwentyFiveAndFortyFivePercent}
...
0
votes
0
answers
49
views
Lightning-data-table navigation issue
Im facing issue on lightning-data-table, each time user has to click pencil icon on each cell instead im trying to give solution to use tab. when they press pencil icon on first cell if they press tab ...
0
votes
0
answers
59
views
Page Unresponsive when Lightning Data table have more column
Im dynamically creating columns in lightning data table for each year months with infinite loading.
ex. the table should look like below
Year-2021 Jan-21 Feb-21....Dec-21 Year-2022 Jan-22 Feb-22...Dec-...
1
vote
0
answers
724
views
LWC Datatable Filtering
I'm struggling to filter my datatable whilst using the infinite scrolling features. The component seems to be duplicating rows, and also not triggering the infinite scrolling after applying a filter.
...
0
votes
1
answer
46
views
lightning-datatale Row Action's disabled attribute not re-render after value change?
I use a lightning-datatable component with below columns config:
isSubmitted
isEdit;
isView;
targetCustomerColumns = [
{ label: "Account Number", fieldName: "accountNumber" },
...
2
votes
1
answer
80
views
How to set large numbers of programmatically generated color variations in lightning-datatable cells?
I want to set the background color to a programatically generated color rather than picking from pre-defined classes. Is that possible?
(This is a solution for using pre-defined classes How to ...
-1
votes
1
answer
350
views
is it possible to select LWC datatable rows(multiple rows) with CTRL and SHIFT keys?
I want to build a UI that shows a list of records and it should allow me to do the following,
I should be able to select multiple rows with the CTRL key to select different records.
I should be able ...
-1
votes
1
answer
236
views
LWC datatable cell focus
I created a lwc component, however when i click on the cell it focuses and shows this outline color blue, is there a way to remvoe this? i tried checking the documentation from slds and implemented ...
0
votes
1
answer
96
views
Inline edit on data table using lightning/uiRecordApi
I am trying to using lightning/uiRecordApi in lightning-datatable to display a list of record and to inline edit some fields and save. In the draftValues I am not getting the Id of the record but I am ...
0
votes
1
answer
187
views
Show a small spinner at the right edge of a table cell - best CSS?
I have a Custom Datatype with standardCellLayout: false set - HTML below - that I'm using in lightning-datatable for some data that arrives a few seconds after the table is rendered.
My problem is how ...
0
votes
0
answers
347
views
Issue with Inline editing Datatable Lightning web component with values populated from wrapper class
I have been facing an issue with saving a Datatable with inline editing. The data is a combination of parent and child objects. Hence I had to add a wrapper class to pass the data to the lightning ...
0
votes
1
answer
30
views
Fetching data from Member(Contact) and Devotee(Devotee__C) objects and displaying in one data table. Member data displays but Devotees does not
Data is displayed when I query the Contact record but no data is displayed when I query some data from the Devotees table. Console.log is showing that it is fetching the Devotees data properly from ...
2
votes
0
answers
331
views
lightning-datatable showing currency in EUR in a USD-only org
I am working in an org WITHOUT multi-currency enabled, and the Currency Locale is "English (United States) - USD". I have confirmed this in setup. My user's locale is "English (United ...
0
votes
1
answer
178
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="...
0
votes
1
answer
903
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 ...
1
vote
0
answers
187
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') {
...
1
vote
0
answers
270
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:
<...
0
votes
1
answer
310
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 ...
0
votes
0
answers
984
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 ...
0
votes
1
answer
764
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,...
1
vote
0
answers
114
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"...
1
vote
0
answers
103
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&...
1
vote
1
answer
917
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 ...
1
vote
1
answer
464
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:' + ...
0
votes
1
answer
43
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 ...
5
votes
1
answer
398
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
...
0
votes
1
answer
1k
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 ...
0
votes
0
answers
558
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 ...
0
votes
1
answer
82
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 ...
0
votes
2
answers
153
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 ...
5
votes
0
answers
147
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 ...
0
votes
0
answers
126
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-is-...
0
votes
1
answer
760
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, ...
5
votes
2
answers
1k
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 ...
3
votes
1
answer
923
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 ...
1
vote
1
answer
267
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 ...
0
votes
0
answers
136
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={...