You need to sign in to do that
Don't have an account?
suji srinivasan
Unable to round off number for customfields in LWC
I would like to display month as a column in datatable based on created date & I need to roundoff number for customfields .
How to achieve this?
js:
import { LightningElement, wire, track } from 'lwc';
import getsalarylist from '@salesforce/apex/salarylist.getsalarylist';
const COLS = [
{ label: 'Month', fieldName: 'createddate', type: 'date', typeAttributes:{
month: "long"
} },
{ label: 'BasicAllowance', fieldName: 'BasicAllowance__c', type: 'Decimal' },
{ label: 'HouseRentAllowance', fieldName: 'HouseRentAllowance__c', type: 'Number' },
{ label: 'SpecialAllowance', fieldName: 'SpecialAllowance__c', type: 'Number',typeAttributes:{maximumFractionDigits:0} },
{ label: 'PF', fieldName: 'PF__c', type: 'Number' },.....................
Thanks in advance
How to achieve this?
js:
import { LightningElement, wire, track } from 'lwc';
import getsalarylist from '@salesforce/apex/salarylist.getsalarylist';
const COLS = [
{ label: 'Month', fieldName: 'createddate', type: 'date', typeAttributes:{
month: "long"
} },
{ label: 'BasicAllowance', fieldName: 'BasicAllowance__c', type: 'Decimal' },
{ label: 'HouseRentAllowance', fieldName: 'HouseRentAllowance__c', type: 'Number' },
{ label: 'SpecialAllowance', fieldName: 'SpecialAllowance__c', type: 'Number',typeAttributes:{maximumFractionDigits:0} },
{ label: 'PF', fieldName: 'PF__c', type: 'Number' },.....................
Thanks in advance
Have you been able to find an answer to this or still looking for an answer? Thanks