Altinn / Altinn/app-frontend-react

Possibility to filter optionlists

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

Description

### Description

I would like the possibility to filter an option list based on an answer in a previous question, F.ex. if you have a big table of questions with a lot of alternatives like this:
![TabellMedAvkrysning](https://github.com/user-attachments/assets/a2280b46-d495-4179-bcfa-9aee58172f9f)

it would be a good idea to be able to have a filtering question that asks which animals you have on your farm, so if you only
have "Gris, Sau, Geit" you would have only three alternatives in the table. This would be user friendly and easier to implement than having to use code.
![image](https://github.com/user-attachments/assets/d0262e88-bd20-417e-b6b3-591190adbc2f)

It's important to keep in mind that the option list has to be allowed to be empty before the filter question is answered. I would of course have to hide the followup questions before there are elements in the option list. This might create an unwanted situation in Studio, so beware that it shouldn't cause a full crash there.

### Additional Information

See Slack discussion here for ideas on how to solve this:

https://altinn.slack.com/archives/C02EJ9HKQA3/p1725536255701569

Contributor guide

Open the contributing guide

Research direction

No files or tests are named. Start with the issue examples and the linked Slack discussion to understand the proposed filtering behavior and inspect how option lists and Studio handle empty values. Done means a previous answer can filter a later option list, the list may be empty before filtering, and Studio does not crash.

Written by the indexing model from the issue text.

Assessment

Tech stack
react, typescript
Domain
frontend
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
28/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.