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
16 views

Disable checkbox in lightning:datatable

Below is my lightning datatable <lightning:datatable columns="{!v.myclmns}" data="{!v.mydata}" keyField="id" ...
0
votes
2answers
35 views

Trying to use onKeyup in a table which has iteration

I need to get an input filed (let's say an email field) inside a table with a wrapper list iteration. OnFocusout is what I am using right now which will get the row number of the table as aura:id. And ...
2
votes
0answers
33 views

LWC datatable column width responsive

I have a LWC component (NOT Aura) that has a datatable with just one column. By default, the width of that column is 1000 px, which is way too small. Using max-column-width="4000" or similar on the ...
0
votes
1answer
25 views

lightning datatable: get additional records by enableInfiniteLoading

How can I get additional records by lightning datatable enableInfiniteLoading? I wanna get more 10 records when scroll lightning datatable, but the datatable shows only first 10 records when scroll ...
2
votes
1answer
47 views

How do I switch off the 'edited' highlighting in LWC lighting-datatable?

I'm using a lightning-datatable in LWC, and hooking into 'oncellchange' to ensure that any inline editing is automatically included in the underlying javascript data model immediately. I then have ...
0
votes
2answers
61 views

how to remove header of lightning component [closed]

Does anyone know how to delete the header of lightning datatable, and how to put data parts only? I would like to make table like the attached image. Red cross parts is supposed to be removed.
0
votes
1answer
59 views

How to force width resizing of lightning:datatable?

I've structured a component in a way that either a lightning:datatable aura component or a lightning:dualistbox. The dual list box is used to set the columns attribute of the data table. The issue is ...
0
votes
0answers
23 views

Lightning: datatable reload only the datatable data on click of inline edit

i have created a lightning datatable using a wrapper class. i am using the inline editing functionality and once the field is edited, onclick of save button, the datatable should be reloaded with new ...
0
votes
1answer
37 views

lightning data table : how to fetch record id for the selected row

I have created a datatable in lightning using a wrapper class. I have added a edit button inside the datatable to edit a particular column field from the table. Now i need the record id of the record ...
0
votes
1answer
29 views

How to include selectOption field for aura datatable

I am trying to build a datatable with selectOption as one of the table columns. i.e. doInit : function(component, event, helper){ component.set('v.columns', [ {label: 'Booking Name', ...
0
votes
0answers
29 views

Lightning DataTable Date Column Set Min/Max

Is it possible to add Min/Max attributes when defining date columns for Lightning DataTable? I can definitely add custom validations to show error etc, but it would be ideal to have the irrelevant ...
2
votes
1answer
23 views

Possible to change url target in lightning datatable?

I am using a <lightning:datatable> to display some data in a Quick Action. It works great, and I was able to get the table to display the name of a parent record as a link using a column ...
1
vote
0answers
38 views

Dynamically highlight lightning:Datatable Row

I'm using a lightning:datatable to display some data coming from a third party web service. I have a scenario to dynamically highlight a row based on a specific condition. How can I do that? What ...
2
votes
2answers
101 views

Freeze first column in horizontal scroll on lightning data table salesforce

I have created lightning datatable. How to freeze first column only while scrolling horizontal (not vertical) in lightning datatable.( or css) Source code : <div class="slds-scrollable_y" style="...
0
votes
0answers
29 views

Single select checkbx in Lightning datatable

I have lightning datatable with below definition Component table definition: <lightning:datatable aura:id="PYearTable" columns="{!v.columns}" data="{!v.data}" ...
0
votes
0answers
70 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 ...
0
votes
2answers
52 views

Access field values from JSON String in Lightning Component controller [closed]

PFB Code. I want to validate few fields before save but not able to fetch field values from JSON string. saveFunction:function(component, event, helper){ //Production Year Details/...
0
votes
1answer
58 views

Search/Filter functionality in a lightning table without using jquery. Response from server side will be json

Json response: {"rows":[{"vals":[{"val":"Abc Corp","cssClass":""},{"val":"GROUPA","cssClass":""}, {"val":"Eitan","cssClass":"responsiveHide"}, {"val":"9","cssClass":"responsiveHide"}, {"val":"$18.9K",...
0
votes
1answer
70 views

Lightning Web Component lightning-datatable and re-render button

With an aura component lightning:datatable its possible to change the label of a button on rowaction. In fact an example is provided in the lightning component reference by changing the label ...
-1
votes
2answers
157 views

lwc data-table not rendering

I'm sure that the answer to this question is simple, I just can't seem to see it. My data table is not rendering any data and I have no idea why. I have reviewed entirely too many examples online and ...
2
votes
2answers
133 views

Conditionally enable edit in lightning:datatable

I'm trying to do a dynamic editable field, this is what I've got: Component <lightning:datatable columns="{!v.columns}" data="{! v.data }" keyField="{! v.keyField }" ...
0
votes
0answers
233 views

LWC Lightning-DataTable row Actions Error

Let's say I have a LWC with the following JS controller export default class Approvals extends LightningElement { @track pendingApprovalHistories =[ { Name : "Han Solo", CreatedDate : "...
0
votes
1answer
39 views

Is it possible to use navigateToSObject with data tables

I am using below to convert Subject column to hyperlink as below {label: 'Subject', fieldName: 'linkName', type: 'url', typeAttributes: {label: { fieldName: 'Subject' }, ...
1
vote
2answers
158 views

lightning:datatable won't show data in column with type of 'boolean'

I am trying to render a lightning:datatable in a custom lightning component and for some reason the columns with a type of 'boolean' are not displaying data. The chrome console verifies that the ...
0
votes
1answer
43 views

Unable to get record in Lightning Datatable

I am trying to display records from Contact Object in a Lightning Component in a datatable. Somehow the records are not getting displayed. Can someone please help where am I going wrong? Apex ...
0
votes
0answers
154 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="...
0
votes
1answer
33 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 ...
1
vote
2answers
405 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
86 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
295 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
142 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
94 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
39 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
310 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
82 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
37 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
281 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
227 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
31 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
177 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
83 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
553 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
100 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
107 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
31 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
1k 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
108 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
15 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
237 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'...
1
vote
2answers
277 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 ...