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.

227 questions with no upvoted or accepted answers
Filter by
Sorted by
Tagged with
7 votes
1 answer
4k views

How can I disable the checkboxes for specific rows on lightning:datatable?

I have a lightning:datatable component: <lightning:datatable columns="{!v.columnsPhone}" data="{!v.dataPhone}" keyField="id" ...
tutouser's user avatar
5 votes
0 answers
2k views

LWC lightning datatable: Enabling Popover Overflow

I'm creating a lwc datatable with a custom column which contains a button and a corresponding popover. The problem is that the popover will not display as I would like it to, though by playing ...
thomnguyen's user avatar
5 votes
0 answers
677 views

Confirmation that it is presently not possible to create a custom icon and use it in a lightning:datatable?

The lightning:datatable has an "Appending an Icon to Column Data" feature that allows an iconName to be taken from one of the data fields and the icon output to the left or right of the cell text. The ...
Keith C's user avatar
  • 136k
5 votes
1 answer
3k views

LWC Datatable - Turn Custom Lookup Field Value in Editable Datatable to Draft Value for Mass Update

As you know, datatables do not support lookup field. I've built a search lookup field that queries an object, and added that to the LWC datatable as a custom type. The id of the selected record (...
Fred's user avatar
  • 51
4 votes
0 answers
56 views

When will ::part be available and will header cells in lightning-datatable be allowed for overriding?

I am specifically asking about the answer provided here We have many projects which have community implementations. As it is well known that communities tend to have their own themes and styles, the ...
salesforce-sas's user avatar
3 votes
0 answers
7k views

Datatable column-widths-mode="auto" creates horizontal scrollbar on table

When I set column-widths-mode="auto" on a <lightning-datatable>, I notice there appears a horizontal scrollbar. This seems to be a bug. Anyone know anything about this, or how to fix? (...
jbyrd's user avatar
  • 641
3 votes
0 answers
1k views

LWC - Datatable (not aura) horizontal scroll bar and white space issue

How to make the column width auto for LWC datatable columns (not AURA). Tried the following it looks its working but adds extra space on horizontal scrollbar and headers are not aligned with data rows ...
ab0369's user avatar
  • 365
3 votes
0 answers
570 views

LWC datatable multiple row actions open at same time

Experiencing this issue above. The error is when I click on many row actions it won't close the previous one and then you will have many open. I'm trying to find a solution to close all and open the ...
S. Bailey's user avatar
3 votes
0 answers
2k views

rows.indexOf(row) on lighning:datatable does not work anymore on Spring 20 (getting selected row)

We are experiencing an issue with a Lightning Component since the Spring 20 release. This LC component contains a lightning:datatable on which we can perform actions on a specific row. For that, on ...
bretondev's user avatar
3 votes
1 answer
3k views

Sending data to lightning-datatable lwc custom column type

I have a custom datatable with a custom column type containing a button, and a modal that pops up after the button is clicked. I am having trouble figuring out how to send my datatable data to the ...
thomnguyen's user avatar
3 votes
0 answers
7k views

refresh lightning:datatable with the new values after saving inline edits

When i edit save the records with the inline edits and do save it with the save button: the edited values get saved in database but the component doesnt get refreshed it still displayed edited values ...
Priya's user avatar
  • 115
3 votes
0 answers
3k views

lightning:datatable disable hover

I created a lightning:datatable, and I want to disable the "hover", I add the "slds-no-row-hover" class, but it doesn't work.. here is my code.. <lightning:datatable aura:id="...
Kevin Garcia Chavira's user avatar
3 votes
0 answers
1k views

Lightning datatable not loading data when scrolled to the bottom

I have created a lightning component which has a lightning:datatable that loads more data as I scroll down. The data loads fine when I use the component explicitly in an app. In the below picture ...
lambad's user avatar
  • 385
3 votes
1 answer
2k views

lightning:dataTable URL won't open in new window

I've got a lightning:dataTable I'm working on for a client. One of the columns is of type URL, and it links to a Visualforce PDF. It is defined in the columns attribute as: { sortable:true, ...
Charles T's user avatar
  • 11k
3 votes
2 answers
4k views

Hyperlinking in Lightning:Datatable

Currently when I use the lightning:datatable and then a column of type url. I cant seem to bind a actual event to the url.. My Code is currently as follows Component <lightning:layoutItem ...
Londoner_Tom's user avatar
3 votes
1 answer
2k views

lightning-tree-grid link to js function?

I'm working on an lwc that has a lightning-tree-grid (nested datatable). I've made it so the name column is type:url with a link to the record. That works, but it's not really what I want to happen. I'...
PatMcClellan__c's user avatar
2 votes
0 answers
508 views

Lightning Datatable - setActiveCell to openInlineEdit

LWC Lightning datatable offers a method to open an inline editor openInlineEdit() which opens the inline edit panel for the datatable's currently active cell. (See here: https://developer.salesforce....
zaitsman's user avatar
  • 1,930
2 votes
0 answers
2k views

How to save picklist value in custom lightning datatable?

I have just started working with Lightning Web Components, and I am attempting to add picklist functionality to my datatable. My standard cell edits/saves are working as intended, but I am unable to ...
vpsdp's user avatar
  • 21
2 votes
1 answer
866 views

Remove box-shadow on Active Cell in datatable

I've been pouring over slds styling hook docs and datatable docs and I cannot figure out how to remove this box shadow when the cell has focus. I know for sure it's box shadow because when I uncheck ...
chinnc's user avatar
  • 21
2 votes
0 answers
252 views

Any way to make button-icon icons in a lightning-data table smaller?

I've tried e.g.: { type: 'button-icon', typeAttributes: { iconName: 'utility:jump_to_bottom', variant: 'brand', ...
Keith C's user avatar
  • 136k
2 votes
0 answers
280 views

Lightning datatable header bottom border missing

When I scroll the table to the right, the bottom border of the header row is not showing. In the next image we can see that the border disappear just before the third column cell ends. This is the ...
Carlos Hernandez's user avatar
2 votes
0 answers
690 views

Can I bold the last three lines of "lightning-datatable" in a LWC?

//html <div class="last-row-bold"> <lightning-datatable class="slds-table_striped" key-field="Id" data={dataForDisplay} ...
unique user's user avatar
2 votes
0 answers
472 views

Lightning Datatable does not properly resize when inside grid (flexbox)

Normally the width of a <lightning-datatable> changes dynamically as you change the width of the browser. However, When I put a <lightning-datatable> inside a grid (<div class="...
jbyrd's user avatar
  • 641
2 votes
0 answers
776 views

Get lightning datatable to stretch vertically to full height of parent container while retaining sticky header

I have a tab in salesforce where I have a header and a <lightning-datatable> below the header. Conveniently the datatable has an overflow-y built into it so that if you limit the height of the ...
jbyrd's user avatar
  • 641
2 votes
2 answers
3k views

Child component not refreshing when updating data from Parent Component

I am using a util lwc data table and passing list of records from the parent component, I am using a refresh button to re-fetch the records from Apex (imperatively) and update the LWC data table but ...
anxiousAvocado's user avatar
2 votes
0 answers
612 views

Lightning Datatable :: Enable Editing without inline editing

I have an LWC component which uses lightning Datatable i.e., Edit Values(A). This is embedded in Read Only mode in an Aura component which we display on the Opportunity object. There is inline editing ...
rvardhan's user avatar
2 votes
0 answers
3k views

Adding toolTip on mouse hover of info icon in LWC datatable result

I want to add tooltip to a particular column value of data table on mouse hover. I tried with URL type but the the column value should now be clickable. So I decided to add a info icon and tried to ...
Anu's user avatar
  • 3,847
2 votes
0 answers
727 views

LWC - When tabbing in Datatable, view scrolls up

I am creating a LWC (non-Aura) using lightning-accordion and lightning-datatable to display a list of contact related items. There are several accordion sections. I am able to do for each section: ...
user79627's user avatar
2 votes
0 answers
1k views

Lighting Data Table with large data set lagging on chrome browser

So I have this requirement to show folder and report as a hierarchy in LWC (used lightning tree for the same with custom icons for folders and reports.) and on click of any report, we fetch the report ...
Rakshit Segwal's user avatar
2 votes
0 answers
2k views

Refresh datatable using RefreshApex in LWC

I am new to LWC. I have questions regarding refreshApex. I was not able to find answers in the official documentation or other sites. 1) How does refreshApex know which datatable to refresh if there ...
Koustubh's user avatar
  • 1,143
2 votes
0 answers
625 views

Lightning Console: Hyperlink in lightning Data Table

The hyperlink/Url in LightningDataTable is not opening in a new primary tab. Instead, it's opening in a subtab in lightning console. I have tried "_self" and "_blank". Blank is opening in new browser ...
SFDC_BigDog's user avatar
2 votes
0 answers
843 views

Tooltips in Lightning Datatable URL - Multiple Field Names?

Trying to create a dynamic tooltip for my Lightning Datatable URL so using field names (well singular fieldname at the moment) instead of text but was wondering if there is any way to include multiple ...
Bobbygllh's user avatar
  • 731
2 votes
0 answers
220 views

Calling a lightning component when user clicks on url type cell in lightning:datatable

I have a lightning:datatable which have a few columns. The first column is of type url. <lightning:datatable columns = {!v.columns}" data="{!v.data}" keyField="Id" ...
lambad's user avatar
  • 385
1 vote
0 answers
20 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,829
1 vote
0 answers
30 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
0 answers
222 views

How to include nested datatable with custom columns

Currently, I'm displaying the aggregate list of opportunities in a data table along with a custom button named "View Details" as a column. When someone clicks this button I want to display ...
Pavan tej's user avatar
  • 1,460
1 vote
0 answers
156 views

Lookup Type Column in LWC Datatable dropdown hidden

I have custom Datatable to show the lookup lightning-record-edit-form input field as column type, however, the dropdown is going to be hidden, is there a way to bring it onto the cell? ...
Ajay 's user avatar
  • 1,589
1 vote
0 answers
145 views

Is there a bug with the accessibility features of the lightning-datatable component

I'm facing an accessibility requirement to allow users to navigate from one clickable td content in a table to another using the tab key. This is the usual behaver when using tab with a table in HTML. ...
Lior Lavi's user avatar
  • 374
1 vote
0 answers
805 views

Generate PDF With LWC

Need to save a pdf of the particular div which include Lightning-Datatable. Below are options I don't want to use as workaround: window.print(); Vf redirect(Solutions without Visualforce Page) Tried ...
Shreyash Vyas's user avatar
1 vote
0 answers
1k views

LWC Lightning Datatable - Highlight Cell Dynamically

I am trying to highlight a cell dynamically. I have used this link however I get an error. Link: https://www.salesforcetroop.com/datatable_styling_in_lwc HTML: <lightning-datatable data={data} ...
some guy's user avatar
  • 141
1 vote
0 answers
993 views

Datatable LWC - Lookup Field

I stuck with adding the lookup field into my Datatable component. I have two lookup fields AssetId and PricebookEntryId. I want to make AssetId clikcable, and PricebookEntryId editable. I created ...
ApexNewbie's user avatar
1 vote
0 answers
160 views

Certain fields (spanning across object relationship) displayed as blank in lightning-datatable

We have a custom object called a "Plan" (API NAME: Plan__c). Plans have rather complex relationships with contacts. In order to account for the complexity of the relationships, we have a ...
ZJC's user avatar
  • 11
1 vote
0 answers
2k views

I have a button in LWC Datatable which will view cases, i want to switch between hide/view case using same button inside LWC datatable. How to achieve

Below is my component, when i click view case it shows all cases associated with the account, and should change the label to hide case. And when clicked on hide case it should hide the cases shown ...
Naveen's user avatar
  • 65
1 vote
1 answer
327 views

lwc datatable: how to reenable scrolling after setting enableInfiniteLoading = false;

I have a lightning datatable with the infinite scroll working beautifully. It properly loads a list of records, in paginated groups of 20 rows at a time.. and when it loads the completed list, it ...
bkwdesign's user avatar
  • 581
1 vote
1 answer
494 views

NoErrorObjectAvailable Script error Salesforce LWC when updating LWC data table with changed picklist value

I have implemented Custom type (custom component and custom data table) to show picklist values in LWC datatable. I have an event fired from this custom component and handling this event in my ...
Sudhir Balijepalli's user avatar
1 vote
1 answer
1k views

lightning-data table styling

I have an lwc that is used to display a lightning-input in a lightning-datatable. I cannot get it to look right. showProducts.js (parent lwc) import { LightningElement, wire, track } from 'lwc'; ...
mackmama's user avatar
  • 709
1 vote
0 answers
465 views

How to Update Records for lightning-datatable that have not been committed yet in a screen flow

I am using a lightning-datatable for flow screen navigation where by a user loops through a screen flow to generate objects that are stored in a collection variable that are actually inserted at the ...
asapre22's user avatar
1 vote
0 answers
1k views

Displaying errors on multiple cells LWC

As per the salesforce documentation we can display error for lightning datatable by setting the "error" attribute. I followed the same but it is not turning the cell border red and ...
Adarsh Srinivasan's user avatar
1 vote
0 answers
784 views

Insert a draft data to a datatable using modal before saving all draft values

I making a lightning component that can do the following: Click a button to open a modal Enter required Account details and hit the save button, this will save the details as a draft to the datatable ...
Jaemy Malik's user avatar
1 vote
2 answers
9k views

LWC Datatable with Edit button unable to grab ID in Row Action

My first LWC. This datatable will show a list of Lean__Issuelog__c objects with an edit button that will open the record in a new window allowing edit. When I click the edit button I receive A URL ...
Newb2Coding's user avatar

1
2 3 4 5