Stack Exchange Network

Stack Exchange network consists of 175 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

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.

0
votes
0answers
21 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..
0
votes
1answer
23 views

Lightning DataTable with CaseShare - Returning User or Group Name

I am using the lightning datatable in order to display the CaseShare data for a Case record within a lightning component. The feature works great however as the field UserOrGroupId on the CaseShare ...
0
votes
1answer
60 views

Hyperlink record name LWC datatable

I am trying to fetch List of sobjects and show them in data table. I want to add a hyperlink to record name. I am using @wired property to dynamically get records depending on the search term. my ...
1
vote
1answer
30 views

In lightning-datatable, is there a way to get focus?

I have a lightning-datatable, and I'd like to use keyboard shortcuts for my actions -- but to do that I'll need to be able to determine the row that is currently in focus. I can't find documentation ...
0
votes
1answer
65 views

Lightning Web Components lightning-datatable detect “select all” checkbox

When using the lightning-datatable component, by default each row has a checkbox beside it (unless so explictely specify hideCheckboxColumn to false). So when a row is selected the onrowselection ...
2
votes
1answer
26 views

What controls the sortDirection arrow in lightning-datatable?

I have a lightning-datatable (lwc) that has a number of columns that are sortable. I'm tracking the sort direction of each column with a separate variable. The sorting works great, including ...
1
vote
1answer
54 views

How to choose the Owner Name field in Lightning data table

({ method2 : function(component,event,helper){ component.set("v.mycolumns",[{label: 'Subject ', fieldName: 'Subject', type: 'string'}, {label: 'Priority', ...
0
votes
1answer
29 views

lightning datatable populate on paste from clipboard

Is it currently possible access the clipboard conents from the onpaste event for the lightning datatable? If so how? If not then is there a work around? I want to copy an paste from Excel and ...
0
votes
1answer
78 views

Add hidden columns in lightning:datatable

How to add hidden columns in the lightning data table? Thanks. Is there anything I can add to typeAttributes/cellAttributes to make it invisible?
1
vote
0answers
47 views

How to get lightning-table column width in an aura wrapped LWC

I have a LWC that is wrapped in an aura component. I have been spinning my wheels for a few days on trying to access the attributes of the lightning-datatable after it's been loaded, specifically the ...
0
votes
1answer
24 views

Syntax to dynamically set nested property?

I have a lightning-datatable with editable columns. When changes are made and the user presses Save, it calls handleSave(event), which pulls the draftValues and will call Apex to update the records. ...
3
votes
1answer
73 views

lightning-datatable row number error

I have a lightning web component, using lighting-datatable with row-numbers visible. This works well up to 99 records... then I get this: [![enter image description here][1]][1] My component code: ...
0
votes
0answers
42 views

Lightning Data Table and Aura Iteration

I am trying to render multiple data tables on a page (inside lightning accordians but thats irrelevent) using Aura iteration. i am specifically having trouble with the data attribute of the datatable. ...
1
vote
1answer
24 views

Salesforce Lightning:Datatable Add Jquery Datatable Plugin

Is it possible to add jquery datatable to Salesforce Lightning:Datatable? I know its possible to add it in normal html table (using table id), but not sure how to do the same with Lightning:Datatable (...
-1
votes
1answer
39 views

Lightning DataTable - AutoSave DraftValues

<aura:component > <!-- attributes --> <aura:attribute name="data" type="Object"/> <aura:attribute name="columns" type="List"/> <aura:attribute name="errors" ...
1
vote
0answers
44 views

Unable to set title attribute on lightning:datatable text field to display tooltip onhover

I need to set the title attribute on a long text, so that the user can see the full text string onhover and I'm having trouble getting this to work like it used to. It looks like this is being ...
5
votes
2answers
181 views

How to convey LWC's complex Reactive property back to markup?

From SF docs: There are some limitations on the depth of changes tracked for rerendering in reactive properties. The tracking depth depends on the type of the reactive property. Lightning ...
0
votes
1answer
55 views

Lightning Data Table and File Preview

Was wondering if anyone has figured out how to integrate the File Preview (for PDFs, jpgs etc.) that is present in the standard Files Related List into Lightning Data Table? i found this link that can ...
0
votes
1answer
55 views

lightning:datatable row action being blocked

I have a 3 row actions for my datatable row. For some reason it is being block and console is saying it is a security error. I am not sure why error is occuring as I am just doing an alert. Here is ...
0
votes
0answers
27 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 ...
1
vote
1answer
362 views

Lightning Data Table inline edit

How best to update records with changes made in a lightning datatable? The original list of accounts is not automatically updated by inline changes, and the 'draftValues' retrieved when the update '...
0
votes
0answers
42 views

Text Cut off in Lightning DataTable (wrapped)

Having issues with text getting slightly cut of in my lightning datatable. it looks like around 1 letter is getting cut off by the scroll bar. I put some CSS in order to hopefully fix this but it ...
0
votes
0answers
12 views

Hyperlinking a Record in Lightning:datatable [duplicate]

Having an issue with just one small part of this answer someone gave on how to Hyperlink to records in Lightning Data Table my question is what is the second ID (the one with key value of "Id" in the ...
0
votes
0answers
116 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'...
0
votes
2answers
110 views

Hide the default row number from 1st column

I need to remove the 1st column from the lightning table which is the row number but not able to do it. My .cmp looks as follows <aura:attribute name="recordId" type="Id" /> <aura:attribute ...
0
votes
1answer
182 views

How to get unchecked row/checkbox value in lightning:datatable

I am using <lightning:datatable onrowselection="{!c.onSelectContact}" /> for displaying contacts and to check and uncheck checkbox fields. Then in the component controller i use event.getParam(...
3
votes
0answers
106 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 ...
5
votes
1answer
224 views

Can we specify a minimum height for a lightning:datatable/lightning-datatable?

Problem lightning:datatable (rendered as a lightning-datatable) places itself in a wrapper that is only exactly as big as it needs to be. If you click on a header-level action in a table with no rows,...
0
votes
0answers
155 views

Lightning:datatable dynamically disable checkbox per row

I have a lightning:datatable component <lightning:datatable columns="{!v.columnsPhone}" data="{!v.dataPhone}" keyField="id" ...
1
vote
1answer
68 views

Is there a way to insert a <div> right below a datatable row?

I need to put a div right below a lightning:datatable row. Is there a way ?
0
votes
1answer
178 views

lightning:datatable boolean type inline editing

https://developer.salesforce.com/docs/component-library/bundle/lightning:datatable/documentation As per the above document, lightning:datatable does support boolean type. But, it didn't say anything ...
1
vote
1answer
162 views

Displaying multiple errors in lightning:datatable

As per below salesforce documentation we can display error for lightning datatable by setting the "error" attribute. https://developer.salesforce.com/docs/component-library/bundle/lightning:datatable/...
0
votes
1answer
104 views

Get column header label while sorting a lightning:datatable column

As per the salesforce official doc, when we sort a column, we can get the field name by using var fieldName = event.getParam('fieldName'); https://developer.salesforce.com/docs/component-library/...
0
votes
1answer
737 views

Change cell text color based on cell value in lightning:datatable [duplicate]

Can we change the cell text color based on value? for example: if a cell value is "Active" then make the color green, if not then make it red. I have checked cellAttribute for lightning:datatable ...
0
votes
0answers
239 views

How do I put slds-scrollable horizontal scroll at bottom of table (instead of bottom of page)?

I have a lightning:datatable component which has quite a lot of columns, where we want the user to scroll horizontally. The horizontal scrollbar is fixed to the bottom of the page. I would like to ...
3
votes
2answers
466 views

How do you center align the text of the column headings for a lightning:datatable?

I'm able to apply color or make the column heading text bold, but I can't center align the text for some reason. <lightning:datatable data="{! v.data }" columns="{! v.columns }" ...
0
votes
1answer
339 views

Can we add bold style to last row in Lighitng Data table??

I am using "lightning:datatable" tag to display set of rows in UI. Few columns are numeric data. I needed last row to be summarized values of all the data set. I don't find any standard summary ...
5
votes
1answer
367 views

Static values for `<lightning:datatable>`

I've got a working datatable using the following in my component markup: <lightning:datatable columns="{!v.columns}" data="{!v.configuration.channels}" keyField="channelId"/> Columns is a List ...
0
votes
1answer
261 views

Rendering data from Wrapper Class into Lightning Data table

Hi I'm trying to render data from a wrapper class it's coming up with row but values are empty. Component: <aura:component implements="force:lightningQuickActionWithoutHeader,force:hasRecordId,...
1
vote
0answers
30 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" ...
1
vote
1answer
118 views

Datatable inline lookup editing

As showed here we can easily implement an inline editing of a data table. Now I will need to have this editable field to behave like a lookup field and not a normal text field. Is this possible? ...
0
votes
0answers
56 views

Is there an option to handle lightning:datatable OnRowClick event? [duplicate]

My initial requirement is to provide a user with an ability to select one option from the list of data. The list should display a dynamically built table with different columns (String/Date/Boolean). ...
1
vote
2answers
375 views

Show Save and Cancel buttons always on lightning datatable

I have a situation where I need to show Save and Cancel buttons on lightning datatable (inline edit) always. However, unless I edit some field the Save button will not appear. I am displaying the ...
0
votes
2answers
360 views

Is it possible to display 15,000 records in lightning component?

In contact object, we have 15,000 records. I want to display them into a lightning component. Functionality : Need to load 15,000(maybe more) records. Need to provide pagination. Need to Provide ...
1
vote
1answer
278 views

Nested / multi level lighting:datable

I'm looking to see (If it is even possible) to create a multi level lightning datatable. I.E. The parent object has a tickbox in table element 0, If selected a sublevel opens and you can see the ...
3
votes
1answer
208 views

Dynamic Button Icons in a Data Table Similar to Dynamic Actions in a Data Table

It's possible to have actions for each row in a data table that change depending on the contents of the rows (that are changed by those very actions). For example: The component reference provides ...
5
votes
0answers
150 views

How to handle percentage factor of 100 problems when using lightning:input and lightning:datatable?

When working on a bug, I just noticed that lighting:input now supports two percentage formatters, where the older one percent expects the user to know to enter e.g. 0.5 for 50%: <lightning:input ...
0
votes
1answer
1k views

Using wrapper Class in Lightning:Datatable

I am trying to set the data of the Lightning:Datatable from the wrapper class in server-side Controller. public class AccountWrapper{ @AuraEnabled public Account acct {get;set;} ...
0
votes
1answer
557 views

Lightning datatable record shows url of related record

I need to create an activity table like standard look and feel. I got stuck at two point 1.whoid/contact name isn't coming as per need I need to create dummy checkbox field for event Component: &...
0
votes
1answer
1k views

How do we use 'button-icon' column in lightning:datatable?

I'm trying to add button-icon column to my lightning:datatable, but it does not display any icon and simply a blank cell is rendered. I fail to see what I might be doing wrong here. Can someone guide ...