Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

respect field's currency when normalising the number #15566

Merged
merged 4 commits into from
Aug 21, 2024

Conversation

i-just
Copy link
Contributor

@i-just i-just commented Aug 20, 2024

Description

When constructing a Money field and normalising the number for the defaultValue, min and max, we need to explicitly pass the currency to the _normalizeNumber() method. Otherwise, the default USD value will be used as, at that point, the field’s currency property hasn’t been set yet.

Before:
Screenshot 2024-08-20 at 15 10 36
Screenshot 2024-08-20 at 15 10 24

After:
Screenshot 2024-08-20 at 15 09 50
Screenshot 2024-08-20 at 15 10 02

Related issues

#15565

@brandonkelly brandonkelly merged commit 058b152 into 4.x Aug 21, 2024
@brandonkelly brandonkelly deleted the bugfix/15565-money-field-currency-formatting branch August 21, 2024 18:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants