Altinn / Altinn/app-frontend-react

Suffix not showing on Input when there is number formatting present

Open
#3,568 0 comments 1 reaction 0 assignees View on GitHub
kind/bug status/triage
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:

Image

With formatting

Image

### 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

Open the contributing 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.