You need to sign in to do that
Don't have an account?
Julien Salenson
lightning:datatable number without digits
Hi,
I have used a lightning:datatable and I want to format number in a column.
Today, i my controller, I use :
{label: 'My number', fieldName: 'my_number', type: 'currency',sortable : true
},
My result is :
123,00 €
And I want to have :
123 €
=> No digit allowed after the commat.
Is there a way to do that ?
Thanks for your help,
Julien
I have used a lightning:datatable and I want to format number in a column.
Today, i my controller, I use :
{label: 'My number', fieldName: 'my_number', type: 'currency',sortable : true
},
My result is :
123,00 €
And I want to have :
123 €
=> No digit allowed after the commat.
Is there a way to do that ?
Thanks for your help,
Julien
This might help you :
maximumFractionDigits - this will decide how many decimal digits are allowed in your number.
For more information about the formatting of number in Lightning read the document below:
https://developer.salesforce.com/docs/component-library/bundle/lightning:formattedNumber/example
I hope you find the above solution helpful. If it does, please mark as Best Answer to help others too.
Thanks and Regards,
Deepali Kulshrestha
www.kdeepali.com
Thanks for your answer. But it doesn't work.
If I try your code, the result is : 123 456 789 012 345,00 €.
And I want to remove ",00"
Regards