I use the Datatable component and need to expand the number of available decimal places for a field (the field has the correct # of decimal places on the object). I found this documentation but don't know how/where to make this update. Any help is greatly appreciated.
"To specify the granularity on a currency or percentage for inline editing, pass in the step attribute. For example, specify step: 0.01 to allow numbers with two decimal places, or step: 0.001 permits three decimal places. Specify step: 1 to require whole numbers. The default is 0.01. You can preserve the number of fraction digits for display using minimumFractionDigits and maximumFractionDigits.
const columns = [
{
label: 'Confidence',
fieldName: 'confidence',
type: 'percent',
typeAttributes: {
step: '0.00001',
minimumFractionDigits: '2',
maximumFractionDigits: '3',
},
editable: true,
},
//other column data
];
For example, if you pass in confidence: 0.21234 in your column data, the display value is 21.234%. When you inline edit, the step value is used to determine if your input is valid. If you pass in confidence: 0.78, the display value is 78.00% because minimumFractionDigits is set to 2."
Hello @Jared Leuz
Thanks for your response. Datatable is a managed package, so I did not write any JavaScript. The table has a lot of settings that are similar to how JavaScript works. I tried this line in the Special Cell Attributes and Special Type Attributes fields.
Environmental_Surcharge__c{cell: '0.00001'}