Skip to content

MudTabs: Fix ActivatePanel ArgumentOutOfRange- and NullReferenceException#7459

Merged
henon merged 1 commit intoMudBlazor:devfrom
Yomodo:MudTabs_ActivatePanel_crash_Fix
Sep 2, 2023
Merged

MudTabs: Fix ActivatePanel ArgumentOutOfRange- and NullReferenceException#7459
henon merged 1 commit intoMudBlazor:devfrom
Yomodo:MudTabs_ActivatePanel_crash_Fix

Conversation

@Yomodo
Copy link
Contributor

@Yomodo Yomodo commented Sep 2, 2023

Description

Fixes #3609

This PR will guard against an ArgumentOutOfRangeException and NullReferenceException
that can be reproduced in TryMud: https://try.mudblazor.com/snippet/mkQFvwmxsYGypqpP
when the "INDEX 4" button and the first "ITEM FIVE" button are clicked.

I have not included any logic to accomodate the expectation mentioned in the bug report:
For index it could move to the last one or the first one (depending on the direction of the value).
I am willing to create a separate PR for this, if possible.

image

How Has This Been Tested?

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 Sep 2, 2023
@codecov
Copy link

codecov bot commented Sep 2, 2023

Codecov Report

Patch coverage: 100.00% and project coverage change: -0.02% ⚠️

Comparison is base (06570f4) 90.61% compared to head (58b5612) 90.60%.

Additional details and impacted files
@@            Coverage Diff             @@
##              dev    #7459      +/-   ##
==========================================
- Coverage   90.61%   90.60%   -0.02%     
==========================================
  Files         427      427              
  Lines       15199    15200       +1     
==========================================
- Hits        13773    13772       -1     
- Misses       1426     1428       +2     
Files Changed Coverage Δ
src/MudBlazor/Components/Tabs/MudTabs.razor.cs 97.82% <100.00%> (+<0.01%) ⬆️

... and 1 file with indirect coverage changes

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

@ScarletKuro ScarletKuro requested a review from henon September 2, 2023 14:21
Copy link
Member

@ScarletKuro ScarletKuro left a comment

Choose a reason for hiding this comment

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

lgtm

@henon henon changed the title Fix MudTabs.ActivatePanel ArgumentOutOfRange- and NullReferenceException MudTabs: Fix ActivatePanel ArgumentOutOfRange- and NullReferenceException Sep 2, 2023
@henon henon merged commit 0652cb6 into MudBlazor:dev Sep 2, 2023
@henon
Copy link
Contributor

henon commented Sep 2, 2023

LGTM

Thanks @Yomodo

@Yomodo Yomodo deleted the MudTabs_ActivatePanel_crash_Fix branch September 3, 2023 07:53
ilovepilav pushed a commit to ilovepilav/MudBlazor that referenced this pull request Nov 25, 2023
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.

MudTabs ActivatePanel crashes the panel doesn't exists

3 participants