function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Janno RipJanno Rip 

Enter decimals using inline editing in lightning:datatable

Hello everyone,

I have a custom component which displays a datatable - the main part of my component is this:
 
<lightning:datatable 
                         
                         data="{!v.KontingentabrufList}" 
                         columns="{!v.columns}" 
                         keyField="Id"
                         draftValues= "{!v.UpdatedList}"
                         onsave="{!c.SaveUpdatedKontingentabrufe}"
                         hideCheckboxColumn="true"/>
When it comes to the Controller where I define the fields of that table I have one for currency:
 
{label: 'Max Gehalt', fieldName: 'Obere_Gehaltsgrenze__c', type: 'currency',editable: true, 
             	typeAttributes: { step: '0.01', minimumFractionDigits: '2',maximumFractionDigits: '2' }
            },

The problem is when editing the values via Inline Editing he turns:

12,00€ to 1.200€ or 13,50 to 1.350€  (12€ is working fine, he seems to have a problem with the comma - 13.50 turns directly to 1.350€)

I just want him to take the value as I enter it including 2 decimals behind the "comma".

Any suggestions? Thanks!