Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

reset state on prop change for detailList #2006

Merged
merged 1 commit into from
Aug 22, 2022

Conversation

LukasBoll
Copy link
Contributor

closes #1977

Signed-off-by: Lukas Boll lukas-bool@web.de

closes eclipsesource#1977

Signed-off-by: Lukas Boll lukas-bool@web.de
@coveralls
Copy link

Coverage Status

Coverage remained the same at 84.356% when pulling 4b1ebef on LukasBoll:ListWithDetailBug into 73142a3 on eclipsesource:master.

Copy link
Member

@sdirix sdirix left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's not the best solution as this will lead to an unnecessary render pass (initial pass + the pass with index = undefined) however that's still much better than crashing.

In an ideal solution the index should be determined in the same pass where we determined that schema changed. However this requires some code complexity using useRef etc. So for now the current solution is fine.

@sdirix sdirix merged commit 59b39c3 into eclipsesource:master Aug 22, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Selected item is synchronized between ListWithDetail elements - Application Crash
3 participants