Skip to content
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

DataGridMultiSelectColumn produces DataGridSelectReason.RowClick #3192

Closed
rdnlsmith opened this issue Nov 30, 2021 · 1 comment
Closed

DataGridMultiSelectColumn produces DataGridSelectReason.RowClick #3192

rdnlsmith opened this issue Nov 30, 2021 · 1 comment
Assignees
Labels
Area: DataGrid Type: Bug 🐞 Something isn't working

Comments

@rdnlsmith
Copy link

Describe the bug
I am attempting to use the DataGridMultiSelectColumn checkboxes exclusively for selection, so that I can use row clicks to toggle detail rows without affecting selection. However, when I click the checkbox, the RowSelectableEventArgs<TItem>.SelectReason is set to DataGridSelectReason.RowClick instead of DataGridSelectReason.MultiSelectClick.

To Reproduce
I created a minimal reproduction (available here) as follows:

  1. Create an ASP.NET hosted Blazor WebAssembly app using the default .NET 6 template.
    1. Minor tweak: I had to add !important to the display: block on NavMenu.razor.css line 60.
  2. Install packages Blazorise.Bootstrap and Blazorise.DataGrid.
  3. Modify index.html and Program.cs in the client project per the README instructions.
  4. Replace the table on the FetchData.razor page with a Blazorise DataGrid, following the "RowSelectable & Multiple Selection" example in the documentation.
    1. My RowSelectableHandler also logs the SelectReason to the browser console.

Then:

  1. Run the project.
  2. Navigate to the "Fetch Data" page.
  3. Open the browser console.
  4. Click a checkbox on one of the rows.

Expected behavior
The row should be selected, and a line should appear in the console stating "SelectReason: MultiSelectClick".

Actual behavior
The row is not selected, and the console states "SelectReason: RowClick".

Additional context
I have tested this in Chrome, Edge, and Firefox, with the same results in each. However, the example in the documentation does work correctly, even when I cloned the repo and ran the documentation project locally.

I am using the following software versions:

  • Visual Studio 17.0.1
  • .NET 6; dotnet --version gives 6.0.100
  • Blazorise 0.9.5.1 (also occurs in 0.9.5.0)
  • Google Chrome 96.0.4664.45
  • Microsoft Edge 96.0.1054.34
  • Mozilla Firefox 94.0.2
  • Windows 10 21H1 build 19043.1288

Thanks in advance for your help!

@David-Moreira
Copy link
Contributor

Hello,
it's a bug on wasm. Different behaviour.

@David-Moreira David-Moreira added Area: DataGrid Type: Bug 🐞 Something isn't working labels Dec 4, 2021
@stsrki stsrki added this to the 0.9.5 Support milestone Dec 4, 2021
@stsrki stsrki closed this as completed Dec 4, 2021
@stsrki stsrki added this to Support Aug 3, 2024
@stsrki stsrki moved this to ✔ Done in Support Aug 3, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area: DataGrid Type: Bug 🐞 Something isn't working
Projects
Archived in project
Development

No branches or pull requests

3 participants