Skip to content

Call child realize from parent realize. #219

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

Merged
merged 1 commit into from
Sep 29, 2023

Conversation

grokys
Copy link
Member

@grokys grokys commented Sep 27, 2023

Previously we were calling e.g. TreeDataGridCellsPresenter.UpdateRowIndex from TreeDataGridRow.Realize instead of TreeDataGridCellsPresenter.Realize. This was causing the cells presenter to be stuck in a half-realized state. Make sure we call child Realize on realize and parent UpdateRowIndex only when updating row index. Added checks to ensure that UpdateRowIndex can't be called on an unrealized row or cell.

I'm still unclear as to why this shows up only when switching tabs (on the sample app) and I've been unable to create a failing unit test for it so far, hence marking it as draft.

Fixes #218

Previously we were calling r.g. `TreeDataGridCellsPresenter.UpdateRowIndex` from `TreeDataGridRow.Realize` instead of `TreeDataGridCellsPresenter.Realize`. This was causing the cells presenter to be stuck in a half-realized state. Make sure we call child `Realize` on realize and parent `UpdateRowIndex` only when updating row index. Added checks to ensure that `UpdateRowIndex`  can't be called on an unrealized row or cell.

Fixes #218
@grokys grokys marked this pull request as ready for review September 29, 2023 12:18
@grokys
Copy link
Member Author

grokys commented Sep 29, 2023

Customer confirms this fixes the issue. Going to merge because I'm still unable to create a unit test :(

@grokys grokys merged commit d45db09 into master Sep 29, 2023
@grokys grokys deleted the fixes/218-cell-realize-from-row-realize branch September 29, 2023 12:19
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.

Rows arranged incorrectly after switching tabs
1 participant