| | |
| | | import ACCOUNT_PHONE_FIELD from "@salesforce/schema/Account.Type"; |
| | | import ACCOUNT_EMPLOYEES_FIELD from "@salesforce/schema/Account.NumberOfEmployees"; |
| | | |
| | | |
| | | //table css |
| | | import { loadStyle } from "lightning/platformResourceLoader"; |
| | | import WrappedHeaderTable from "@salesforce/resourceUrl/lexdatatable"; |
| | | |
| | | const COLUMNS = [ |
| | | { |
| | | label: "Account Name", |
| | |
| | | connectedCallback() { |
| | | this.getAccounts(); |
| | | } |
| | | |
| | | stylesLoaded = false; |
| | | getAccounts() { |
| | | this.loader = true; |
| | | getAccountsPaginated({ |
| | |
| | | get nextButtonDisabled() { |
| | | return this.nextPageToken === undefined; |
| | | } |
| | | |
| | | renderedCallback(){ |
| | | if (!this.stylesLoaded) { |
| | | Promise.all([loadStyle(this, WrappedHeaderTable)]) |
| | | .then(() => { |
| | | console.log("Custom styles loaded"); |
| | | this.stylesLoaded = true; |
| | | }) |
| | | .catch((error) => { |
| | | console.error("Error loading custom styles"); |
| | | }); |
| | | } |
| | | } |
| | | } |