Altinn / Altinn/app-frontend-react
fixedDecimalScale adding zeros to numbers in Input field
- Dominant language
- TypeScript
- Stars
- 21
- Forks
- 33
- Avg merge
- 6d 23h
- Merged PRs (30d)
- 3
Description
### Description of the bug
When having an Input-field using fixedDecimalScale in combination with a prefix it adds zeroes on the wrong side of the decimal-separator, making the number larger than it is supposed to be!

"formatting": {
"number":
{
"decimalScale": 2,
"fixedDecimalScale": true,
"suffix": " kr"
}}
### Steps To Reproduce
1. Create an Input-field for a decimal datafield using formatting decimalScale larger than zero, fixedDecimalScale and a prefix
2. Run and watch as you type...
### Additional Information
_No response_
Contributor guide
Research direction
No file or test is named in the issue. Reproduce the problem with an Input field using decimalScale 2, fixedDecimalScale, and a prefix, then trace the Input-field formatting path. Done means typing the decimal value with the prefix no longer adds zeros on the wrong side of the decimal separator.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- react, typescript
- Domain
- frontend
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100