On lightning-datatable lwc, how can I remove marginBottom from slds-card__body class?

360    Asked by Unnatigautam in Salesforce , Asked on Sep 6, 2023

We use Lightning data table. It has the slds card_body class, and a part of the slds card_body class is margin-bottom.

I want the margin bottom to be zero. I tried the code, but it did not run for me.

How can I get the SLDS margin that I want?

Answered by Dhananjay Singh

You need to override the CSS of the standard LWC component:

Add in a static resource file content by creating a CSS file:

    Define the variable: isCssLoaded = false;

In reRenderCallback, call the variable.



Your Answer

Interviews

Parent Categories