folkehelseinstituttet / Fhi.Frontend.Demo

MIT License
2 stars 1 forks source link

Refactor tree view selection update logic to avoid exceeding maximum call stack size #564

Closed robinzaal closed 2 months ago

robinzaal commented 2 months ago

Cleaned up and simplified the update logic within the 'fhi-tree-view-selection' component. This refinement avoids unnecessary recursion by examining the 'descendantStateConfirmed' variable before proceeding to update children items.

The previous iteration failed with a JSON-object of 12k lines of code, but the updated code seems to handle at least 130k lines (and probably alot more, but I drew a line at 10x).

github-actions[bot] commented 2 months ago

Azure Static Web Apps: Your stage site is ready! Visit it here: https://nice-bush-002d75103-564.westeurope.2.azurestaticapps.net

proand commented 2 months ago

@robinzaal The code is good to go, but we need to update the changelog. I can do that, and finish the PR.

github-actions[bot] commented 2 months ago

Azure Static Web Apps: Your stage site is ready! Visit it here: https://nice-bush-002d75103-564.westeurope.2.azurestaticapps.net