buli
2023-04-11 e3984fbbf370bf5925250a75bfb6154b4a16685c
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
import LightningDatatable from 'lightning/datatable';
import customUnitTemplate from './customUnit.html';
import customShipmentNumberTemplate from './customShipmentNumber.html';
import customShippingUnitPriceTemplate from './customShippingUnitPrice.html';
import customShipmentAmountTemplate from './customShipmentAmount.html';
import { loadStyle } from 'lightning/platformResourceLoader';
import LexCustomDataTable from '@salesforce/resourceUrl/LexCustomDataTable';
 
export default class LexCustomLightningDatatable extends LightningDatatable {
    static customTypes = {
        customUnit: {
            template: customUnitTemplate,
            typeAttributes: ['unitValue', 'unitOptions', 'recordId']
        },
        customShipment: {
            template: customShipmentNumberTemplate,
            typeAttributes: ['recordId']
        },
        customShipmentUnitPrice: {
            template: customShippingUnitPriceTemplate,
            typeAttributes: ['recordId']
        },
        customShipmentAmount: {
            template: customShipmentAmountTemplate,
            typeAttributes: ['shipmentAmount', 'recordId']
        }
    };
    constructor() {
        super();
        Promise.all([loadStyle(this, LexCustomDataTable)]).then(() => {});
    }
    
}