Altinn / app-frontend-react

Altinn application React frontend
BSD 3-Clause "New" or "Revised" License
18 stars 31 forks source link

Queue for removing nodes #2704

Closed olemartinorg closed 2 weeks ago

olemartinorg commented 2 weeks ago

Description

Reported by SSB. When submitting a form with a large amount of rows in a repeating group, the submit button could end up stalling the main thread and prompting the user with a 'page is stuck, do you want to leave it?' warning. It turns out this happened because of sequential state updates removing nodes from the hierarchy when unmounting the data task.

This should optimize the situation by collecting all the removal requests and iterating them all more closely in the zustand action function.

Related Issue(s)

Verification/QA

sonarcloud[bot] commented 2 weeks ago

Quality Gate Passed Quality Gate passed

Issues
0 New issues
0 Accepted issues

Measures
0 Security Hotspots
100.0% Coverage on New Code
0.0% Duplication on New Code

See analysis details on SonarCloud