microsoft / fluentui-blazor

Microsoft Fluent UI Blazor components library. For use with ASP.NET Core Blazor applications
https://www.fluentui-blazor.net
MIT License
3.23k stars 294 forks source link

Add support for OnRowClick & OnRowDblClick in Fluent Data Grid #1953

Closed MarvinKlein1508 closed 2 weeks ago

MarvinKlein1508 commented 3 weeks ago

🙋 Feature Request

I want to be able to trigger certain actions when I click once on a row within a FluentDataGrid To achive click I can use OnRowFocus but there is no option for double click available.

Basically what I want to do: One click = trigger a bool to display more information (Works with OnRowFocus). Double click = do something with the row item (in my case return it to a different component)

I know that I can add custom buttons into the data grid but I want my user to be able to double click the row from everywhere. For example when I have a lot of columns the user needs to scroll horizontally before he could see the buttons.

dvoituron commented 3 weeks ago

We are adding an "OnClick" event via PR #1952. We could include the Double-click which seems to be a similar modification.

MarvinKlein1508 commented 3 weeks ago

@dvoituron perhaps even for cells. WOuld highly appreciate it.

dvoituron commented 3 weeks ago

@MarvinKlein1508 I don't think so : a double-click on a row will be associated with "highlighted selection". But to add an action on a cell, a button/link would probably be more appropriate.

MarvinKlein1508 commented 3 weeks ago

@dvoituron ah yes, you are right.

vnbaaij commented 3 weeks ago

Beware of a11y! We will need to define how the double click can be initiated without actually clicking (ie keyboard user)

Maybe OnClick=>Enter, OnDblClick=>Shift+Enter od Ctrl+Enter?