MudBlazor/MudBlazor

Add SelectionMode parameter to MudDataGrid for selection behavior consistency

Aberta

#11.346 aberto em 16 de mai. de 2025

 (11 comentários) (0 reação) (0 responsável)C# (1.631 forks)batch import
breaking changeenhancementhelp wanted

Métricas do repositório

Stars
 (10.394 estrelas)
Métricas de merge de PR
 (Mesclagem média 6d 6h) (108 fundiu PRs em 30d)

Description

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

  1. Click on a row to highlight
  2. 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

Guia do colaborador