Skip to content

Input not reformatting after value changes  #74

@irt-msummers

Description

@irt-msummers

Description

If a value is changed programmatically the formattedValue doesn't refresh with fractionDigits. The $ is there but not the fractionDigits.

Version Used

0.11.3

Expected Behavior

It should show the fractionalDigits

Actual Behavior

It shows the fractional digits the first time and on a value that is a whole number but if you change to another whole number it doesn't show them. If you focus in and out of the inputbox it changes like it should.

Props Used

List down the props you used with the component, for example:

<CurrencyInput name="default" bind:value={formState.AskPrice} />

Reproduction Steps

I took your demo and just added a button click

https://svelte.dev/repl/20a823b0befe40ceb3fd3c4bd0b02bcb?version=4.2.10

  1. Click change price in the example
  2. If you leave the number the same it still shows it with the decimal places. As a test, I set askPrice to 22 and change it to 22 it still shows $22.00

Additional Info

  • OS & Version:
  • Browser & Version:
  • Any other relevant details or potential solutions:

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