Skip to content

TreeView: Fix the ParameterView instance has expired.#8361

Merged
ScarletKuro merged 1 commit intoMudBlazor:devfrom
ScarletKuro:tree_fix
Mar 14, 2024
Merged

TreeView: Fix the ParameterView instance has expired.#8361
ScarletKuro merged 1 commit intoMudBlazor:devfrom
ScarletKuro:tree_fix

Conversation

@ScarletKuro
Copy link
Member

Description

Fixes: #8360
Regression was added in: #7810
Also finished the nullable annotation, I didn't pay attention that in PR the annotation was started, but not finished.
I used kinda a workaround to have the same logic , ideally ParameterState should be used, but honestly the logic is cumbersome and needs hours of debugging, I do not have the time for it for now. I left comments in code that redirects to this explanation #8360 (comment)

How Has This Been Tested?

Existing unit tests that luckily covers all this logic

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)

Checklist:

  • The PR is submitted to the correct branch (dev).
  • My code follows the code style of this project.
  • I've added relevant tests.

@github-actions github-actions bot added bug Unexpected behavior or functionality not working as intended PR: needs review labels Mar 14, 2024
@ScarletKuro ScarletKuro changed the title TreeView: Fix the ParameterView instance can no longer be read becaus… TreeView: Fix the ParameterView instance has expired. Mar 14, 2024
@codecov
Copy link

codecov bot commented Mar 14, 2024

Codecov Report

Attention: Patch coverage is 91.89189% with 3 lines in your changes are missing coverage. Please review.

Project coverage is 88.72%. Comparing base (cf6883c) to head (9d5b72e).

Files Patch % Lines
...MudBlazor/Components/TreeView/MudTreeView.razor.cs 93.33% 0 Missing and 1 partial ⚠️
...lazor/Components/TreeView/MudTreeViewItem.razor.cs 92.85% 0 Missing and 1 partial ⚠️
...zor/Components/TreeView/MudTreeViewItemComparer.cs 80.00% 0 Missing and 1 partial ⚠️
Additional details and impacted files
@@           Coverage Diff           @@
##              dev    #8361   +/-   ##
=======================================
  Coverage   88.72%   88.72%           
=======================================
  Files         407      407           
  Lines       12169    12173    +4     
  Branches     2427     2428    +1     
=======================================
+ Hits        10797    10801    +4     
  Misses        848      848           
  Partials      524      524           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@ScarletKuro ScarletKuro merged commit 9555a64 into MudBlazor:dev Mar 14, 2024
selected != Activated && MudTreeRoot is not null)
// See https://github.com/MudBlazor/MudBlazor/issues/8360#issuecomment-1996168491
var previousActivatedValue = Activated;
var activatedChanged = parameters.HasParameterChanged(nameof(Activated), Activated, out var activated);//parameters.TryGetValue(nameof(Activated), out bool activated) && activated != Activated;
Copy link
Contributor

Choose a reason for hiding this comment

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

Spurious comment?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Unexpected behavior or functionality not working as intended

Projects

None yet

Development

Successfully merging this pull request may close these issues.

TreeView: System.InvalidOperationException: The ParameterView instance can no longer be read because it has expired.

2 participants