function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
VSK98VSK98 

disable the wrap text in lightning datatable

Hi All,

How to disable the Wrap or Clip text in Lightning Datatable?

Adv Thanks:)

Regards,
VSK98
Best Answer chosen by VSK98
Khan AnasKhan Anas (Salesforce Developers) 
Hi,

Greetings to you!

As per Salesforce documentation, there is no option to change the default drop-down action of Wrap Text and Clip Text.

However, there is a workaround. Include below lines of code in CSS:
 
.THIS .slds-button_icon-bare{
    display: none;
}

I hope it helps you.

Kindly let me know if it helps you and close your query by marking it as solved so that it can help others in the future. It will help to keep this community clean.

Thanks and Regards,
Khan Anas

All Answers

Khan AnasKhan Anas (Salesforce Developers) 
Hi,

Greetings to you!

As per Salesforce documentation, there is no option to change the default drop-down action of Wrap Text and Clip Text.

However, there is a workaround. Include below lines of code in CSS:
 
.THIS .slds-button_icon-bare{
    display: none;
}

I hope it helps you.

Kindly let me know if it helps you and close your query by marking it as solved so that it can help others in the future. It will help to keep this community clean.

Thanks and Regards,
Khan Anas
This was selected as the best answer
Raj VakatiRaj Vakati
try this css
 
.THIS .slds-button_icon-bare{ display: none; }




Refer this link 


https://salesforce.stackexchange.com/questions/210583/can-i-define-a-lightningdatatable-column-to-default-to-wrap-text

https://salesforce.stackexchange.com/questions/211012/lightningdatatable-component-cutting-off-actions-drop-down-menu-when-it-goes-pa/211045
VSK98VSK98
Thank you all :)