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

Fix currency input #7469

Merged
merged 2 commits into from
Oct 7, 2024
Merged

Fix currency input #7469

merged 2 commits into from
Oct 7, 2024

Conversation

thomtrp
Copy link
Contributor

@thomtrp thomtrp commented Oct 7, 2024

Fix #7458

Copy link
Contributor

@greptile-apps greptile-apps bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

PR Summary

This pull request addresses a bug in the currency input functionality, focusing on properly handling and displaying currency values with thousands separators. Here's a concise summary of the changes:

  • Fixed currency input trimming issue in CurrencyInput.tsx by adding 'unmask' prop to StyledIMaskInput
  • Updated CurrencyDisplay.tsx to correctly process and display full amount values, including commas
  • Modified logic for calculating 'amountToDisplay' in CurrencyDisplay component
  • Imported 'isUndefinedOrNull' utility function in CurrencyDisplay for improved null checks
  • Ensures proper handling of currency values like '400,000' without trimming at the first comma

2 file(s) reviewed, no comment(s)
Edit PR Review Bot Settings

@thomtrp thomtrp merged commit b5d1486 into main Oct 7, 2024
16 checks passed
@thomtrp thomtrp deleted the tt-fix-currency-input branch October 7, 2024 13:00
harshit078 pushed a commit to harshit078/twenty that referenced this pull request Oct 14, 2024
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.

Currency Field Trims Input at First Comma
2 participants