3

I have a lightning : datatable which has a field called name, Now I plan to have an initial width for this column which will truncate the value, The issue is I want to make it like if I hover over the text in the cell name it will show the full value.

This is easy if I use table since I can apply a onmouseover on the selected row which will show a title of some sort

This is the JSON for name column

            "label": "First Name",
            "fieldName": "First_Name__c",
            "initialWidth" : 120,
            "type": "text",

after reading some documentations in regards to datatable, there is typeAttributes : "url" that has a tooltip, but it's only for URL's

any idea or answer will do, Thank you

1

I think you can do this by using custom data types but the amount of effort required may not be worth it, since they are going to be defined as an inner component you can also use onmouseover global events or component event like you described.

Documentation

Custom data type example

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.