About this question
I have created a data table using HTML and JavaScript. But I cannot apply padding on the rows vertically. Is there any way I can do that?
HTML code:
resize-column-disabled show-row-number-column="false"
class="slds-table slds-table_bordered slds-table_striped">
JavaScript Code:
import { LightningElement, track } from 'lwc';
import searchAccounts from '@salesforce/apex/AccountController.searchAccount';
const columnList = [
{label: 'Id', fieldName: 'Id'},
{label: 'Name', fieldName: 'Name', type: 'text'},
{label: 'Website', fieldName: 'Website'},
{label: 'Industry', fieldName: 'Industry'}
];
export default class datatableDemo extends LightningElement {
@track accountList;
@track columnList = columnList;
@track noRecordsFound = true;
connectedCallback() {
searchAccounts()
.then(result => {
this.accountList = result;
this.noRecordsFound = false;
})
.catch(error => {
this.accountList = undefined;
this.noRecordsFound = true;
})
}
}