InseeFr / InseeFr/Lunatic

Resizing loop : lose every missing response

Open
#1,045 1 comment 0 reactions 0 assignees View on GitHub
Type: Bug
Dominant language
TypeScript
Stars
22
Forks
21
Avg merge
9h 13m
Merged PRs (30d)
2

Description

## Describe the bug

When we resize a loop (adding/deleting an iteration) , the remaining iterations keep there values, except their missing values

- [x] I tested it on the storybook, which leads me to believe that it's a lunatic bug.

## To Reproduce

Steps to reproduce the behavior:

1. questionnaire :
[issue_1045.json](https://github.com/user-attachments/files/15897740/issue_1045.json)
2. page 2 : set 1 person
3. page 3, 4.1, 4.2 : give answer, then missing, then answer (whatever the order, it's just to have both for seing problem)
4. go back to page 2 : change to 2 persons
5. go back to the loop for your 1st person : the answers you gave remain 👍 but missings values have disappeared 👎

It is the same if for example you had 3 iterations then changed to 2 : the missings for the 2 remaining iterations disappear

## Expected behavior

When resizing a loop, the remaining iterations should keep their answers, including missing responses

## Version where the bug appeared

Observed on 3.1.0, but was already on 2.7

## Browser where the bug was tested

- [ ] Chrome
- [x] Firefox
- [ ] Safari
- [ ] Edge
- [ ] Other (please specify): ******\_\_\_******

## Additional context

Add any other context about the problem here.

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.