How to use lightning:input (Beta) for percentages that such a 12.3456%?

The lightning:input (Beta) documentation suggests using this markup for percentage input:

<lightning:input
        type="number"
        name="percentVal"
        label="Enter a percentage value"
        formatter="percent"
        step="0.01"
        />

Changing to this:

        step="0.000001"

does allow a value 0f 0.123456 to be entered (and preserved) but it is presented when focus moves away from the field as 12% not 12.4567%.

If there a way to include the extra digits?

(Following the call through in the JavaScript debugger, a fixed underlying formatter called “currencyUSDstylepercent” is used with no reference to the step parameter so I’m assuming the answer to my question is no.)

Answer

Attribution
Source : Link , Question Author : Keith C , Answer Author : Community

Leave a Comment