MudBlazor/MudBlazor
Add SelectionMode parameter to MudDataGrid for selection behavior consistency
開放
#11,346 建立於 2025年5月16日
breaking changeenhancementhelp wanted
倉庫指標
- 星標
- (10,394 顆星)
- PR 合併指標
- (平均合併 6天 6小時) (30 天內合併 108 個 PR)
描述
Things to check
- I have searched the existing issues for this bug
- To rule out a caching problem I made sure the bug also happens in an incognito tab
Bug type
Component
Component name
MudDataGrid
What happened?
I've setup MudDataGrid's RowClassFunc so that a clicked row is highlighted using CSS classes.
When a highlighted row is clicked for a 2nd time, MudDataGrid's SelectedItem property is null
Expected behavior
When a highlighted row is clicked for a 2nd time, MudDataGrid's SelectedItem should not be null,
but must contain that last clicked item.
Reproduction link
https://try.mudblazor.com/snippet/waQJaplgxVjBbZFN
Reproduction steps
- Click on a row to highlight
- Click the same row again to trigger a NRE.
Relevant log output
Version (bug)
8.6.0
Version (working)
No response
What browsers are you seeing the problem on?
Edge
On which operating systems are you experiencing the issue?
Windows
Pull Request
- I would like to do a Pull Request
Code of Conduct
- I agree to follow this project's Code of Conduct