Altinn / Altinn/app-frontend-react

Allow processing multiple options at once (similar to MultipleSelect) with optionLabel

Open
#3,247 2 comments 0 reactions 0 assignees View on GitHub
area/logic kind/feature-request
Dominant language
TypeScript
Stars
21
Forks
33
Avg merge
6d 23h
Merged PRs (30d)
3

Description

### Description

In our app, we need to display Citizenship for a person within a `Panel` component based on a field in the dataModel that contains only the code (for instance: `NOR,MEX`). This needs to work across languages, so storing the text-value explicitly is not an option.

To do this, the most viable path (to me) seems to be expanding `optionLabel` to allow it to process these values (or create an `multipleOptionLabel` option, possibly?), as the functionality already exists in some form since `MultipleSelect` is able to do it.

This works as expected when I map this value to a `MultipleSelect` component directly, _but_ it stops working when the component is hidden, and I need whichever way to solve this to not be "visible" outside the processed value in the `Panel`-komponent.

### Additional Information

_No response_

Contributor guide

Open the contributing guide

Research direction

Start by tracing how Panel resolves optionLabel values and how MultipleSelect processes comma-separated codes. Compare their handling of localized labels and hidden components; done means Panel can display multiple stored option codes such as NOR,MEX in the active language without exposing a visible MultipleSelect.

Written by the indexing model from the issue text.

Assessment

Tech stack
react, typescript
Domain
frontend
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.