You need to sign in to do that
Don't have an account?

How can I stop a Lightning DataTable from showing the WrapText/ClipText drop down
Is there a way to stop the drop down that give and option to wrap or clip text in a lightning data table?

You need to sign in to do that
Don't have an account?
.THIS .slds-button_icon-bare{
display: none;
}
Just curious - when I looked at the inspect window, I did not find this class .SLDS-BUTTON_ICON-BARE
However, I found .slds-dropdown-trigger class
Can you advise where are you seeing the button_icon-bare class?
Thx.
.THIS .slds-th__action .slds-th__action-button { display: none; }
This has worked for me in the past, but does not work on LWC data tables. this will hide the headers drop down for the whole table - if you have more than 1 table and want to do this to seelct tables, add a style class to the table and modify this to be
@Ronald Payne: Thanks!
I have used all the CSS and nothing has worked then I started dig into the documentation and there is a attribute called 'hideDefaultActions' on the columns. When you are defining the column you need to specify this attribute.
Sample code:
const columns = [
{
label: 'Name',
fieldName: 'urlval',
type: 'url',
typeAttributes: {label: { fieldName: 'opportunityName' },
target: '_blank', tooltip: { fieldName: 'opportunityName' } },
sortable: true,
hideDefaultActions: "true"
},
];
This has worked as expected.
Check the "Working with Column Properties" section in the documentation, https://developer.salesforce.com/docs/component-library/bundle/lightning:datatable/documentation
you can use hideDefaultActions : true attribute in your datatable columns.