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
Yoann Boutin 2Yoann Boutin 2 

Lightning-datatable configuration (wrapText)

Hi,

So i'm currently using a lightning-datatable in my LWC and it seems that there is some configuration not working in some cases.
I would like to always have my all my rows with the option "wrapText" selected by default for some columns, so for that i saw that you can put "wrapText: true" in the column config, fine.
Then you need to define "wrap-text-max-lines" on your lightning-datatable component, which i did and set to 3.

So if i just use this configuration everything is fine, but as i always want to have it wrapped i want to remove the default column actions (the one where you select clip or wrap text) and for that you need to have another property to your column config, which is "hideDefaultActions: true" and then it is perfect you don't have anymore the default action on top of your column ...

... BUT, once you put this "hideDefaultActions" to your colonne config, the wrapText one is not working anymore and you column values are fixed to "clip text" which is the default value of the default actions...

This is the problem, i guess it is an issue on the lightning-datatable to not be able to combine those 2 configuration, i know that the hideDefaultActions and wrapText are pretty new properties, so am i doing something wrong or is there a real issue on SF side ?

Don't hesitate if i missed something or if you need more information

Regards,
Yoann BOUTIN
kevil jeannkevil jeann
 While creating a data table, we require a few html tags and we add css if we want to. In lightning experience..ec

check Hen House survey (https://surveydetails.com/)