Altinn / Altinn/app-frontend-react
Suffix not showing on Input when there is number formatting present
- Dominant language
- TypeScript
- Stars
- 21
- Forks
- 33
- Avg merge
- 6d 23h
- Merged PRs (30d)
- 3
Description
### Description of the bug
When adding a `suffix` in the `textResourceBindings` of an Input component that also has a `formatting` property with a nested `number` property, the component does not show the suffix as it would otherwise.
The expected behaviour is that it would show the suffix in the same "style" while being able to keep the functionality that the number formatting provides.
Without formatting:
With formatting
### Steps To Reproduce
1. Add a component with the following properties to a layout page:
```json
[
{
"id": "input",
"type": "Input",
"textResourceBindings": {
"title": "title",
"suffix": "suffix"
},
"dataModelBindings": {
...
},
"formatting": {
"number": {
"decimalScale": 0,
"allowNegative": false
}
}
}
]
```
2. See that it does not show the suffix with the expected styling.
### Additional Information
_No response_
Contributor guide
Research direction
Start by reproducing the issue with the provided Input configuration, comparing the suffix rendering with and without the nested number formatting. Trace the Input component's formatting and suffix handling, then verify that the suffix has the expected styling while number formatting remains functional.
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