Skip to content

Apply formatting of cents on:blur when the value doesn't have any cents #52

@irt-msummers

Description

@irt-msummers

If you just enter a whole number or just to the tenths -- it leaves it without formatting it with the cents. I did it really kludgey by
let fd=0
const setF = () => {
fd=2
setFormattedValue()
fd=0
}

and changed
formattedValue = isZero ? '' : formatCurrency(value, fractionDigits, fd);

and then [
(on:blur={setF})

I am sure there is a better way

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingreleased

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions