1

Is there any way to validate input field of type number in lightning-datatable, like it is in input field of type currency? I want to have 3 maximum fraction digits. And check validation on inline edit the same way as it is in case of currency type, with red label warning.

LWC

    const columns = [
         {
label: 'Currency Fields', 
fieldName: 'curr', 
type: 'currency', 
typeAttributes: { step: "0.001", maximumFractionDigits: 3} },
         {
label: 'Number Fields', 
fieldName: 'num', 
type: 'number', 
typeAttributes: { /*there is no step property...*/ } }
    ];
1
  • 1
    Hi and welcome to SFSE. Please read How to Ask then edit your question to include detail of what you have tried and where you are stuck. Without this information it is likely your question will be closed without answer.
    – Phil W
    Jun 1, 2021 at 9:39

0

Browse other questions tagged or ask your own question.