GithubHelp home page GithubHelp logo

Comments (16)

gustavnavar avatar gustavnavar commented on May 18, 2024 1

My intention is to publish a preview of the 3.1 version today or tomorrow.

And I don't think that I will produce any other update to the version 3.0

from grid.blazor.

gustavnavar avatar gustavnavar commented on May 18, 2024 1

GridBlazor 1.3.6 allows to change the modifier key used for keyboard navigation using the SetModifierKey method of the GridClient object:

    var client = new GridClient<Order>(HttpClient, url, query, false, "ordersGrid", Columns)
        .SetModifierKey(ModifierKey.ShiftKey);

The parameter options of the SetModifierKey method are:

  • ModifierKey.CtrlKey (default value)
  • ModifierKey.ShiftKey
  • ModifierKey.AltKey
  • ModifierKey.MetaKey

The last 2 options can collide with the modifier keys of the browser. The recommended options are ModifierKey.CtrlKey and ModifierKey.ShiftKey.

from grid.blazor.

gustavnavar avatar gustavnavar commented on May 18, 2024 1

Versions before GridBlazor 1.3.9 had the keyboard navigation enabled by default. This feature requires to focus on the grid element, but it can create problems when used on pages with 2 or more grids. As a consequence, starting with version 1.3.9 it has to be explicitly configured for each grid that requires keyboard navigation. Users can enable keyboard navigation between pages using the SetKeyboard method of the GridClient object:

    var client = new GridClient<Order>( ... ).SetKeyboard(true);

The parameter default value is false.

from grid.blazor.

gustavnavar avatar gustavnavar commented on May 18, 2024

I will add the up and down events to move between pages.

from grid.blazor.

DrGriff avatar DrGriff commented on May 18, 2024

Maybe:

  • [Left] and [right] arrows to navigate between pages

  • [Home] to navigate to the first page

  • [End] to navigate to the last page

  • [Up] and [Down] to navigate from one row to another (if rows are selectable - guess first row would need to be selected by default)

from grid.blazor.

gustavnavar avatar gustavnavar commented on May 18, 2024

This feature will require .Net Core 3.1 because it's necessary to use event's propagation stop.

I will add a new branch for .Net Core 3.1 support.

from grid.blazor.

gustavnavar avatar gustavnavar commented on May 18, 2024

there is a new commit in the branch https://github.com/gustavnavar/Grid.Blazor/tree/net-core-3.1 including the keyboard navigation.

But no nuget package published yet.

from grid.blazor.

DrGriff avatar DrGriff commented on May 18, 2024

Would you consider publishing the 3.1 version as a Beta NuGet package? Is your intention to replace the 3.0 version once 3.1 is fully released by Microsoft?

from grid.blazor.

gustavnavar avatar gustavnavar commented on May 18, 2024

Nuget packages implementing this changes has been released. They are for .Net Core 3.1-Preview3

  • GridBlazor: 1.3.0-Preview3
  • GridMvcCore: 2.11.0
  • GridShared: 2.11.0

from grid.blazor.

DrGriff avatar DrGriff commented on May 18, 2024

May I suggest one improvement that I think would really help?

If the ClientGrid is marked as .Selectable(true) then when the grid loads, the first row is automatically selected.

Current behaviour

  1. Page loads with Grid
  2. The [Up] and [Down] arrows don't work
  3. The user has to manually select one row using the mouse to get these arrows to work
  4. The user clicks the [Right] arrow, this moves us to the second page
  5. The [Up] and [Down] arrows again don't work without having to click the grid

This still requires a swapping between the keyboard->mouse->keyboard.

I guess there is a choice in how this should be implemented:

  1. The first row should automatically be selected when the page loads (unless the provided Grid State says otherwise)
  2. The .Selectable(true) could have a new optional parameter that can be set to "true" to control this
  3. A method is exposed that allows us to manually select a row, e.g. Select(int rowOrdinal)
  4. An alternative is for the consuming code to control this, allong the lines of this post

The concern would be if the automatic behaviour started to override other expected behaviour....

from grid.blazor.

gustavnavar avatar gustavnavar commented on May 18, 2024

GridBlazor 1.3.2 supports the configuration to automatically select the first row when a page loads.

There is a second parameter of the Selectable methos to control this behavior.

from grid.blazor.

dringwala avatar dringwala commented on May 18, 2024

I have issue with Left and Right arrows for page navigation. I have more columns on grid that it can fit on screen. With that, if i use left or right arrows, page scrolls to left or right without realizing page control also changes to left or right. I have added ctrl qualifier to navigate pages.
This allows end user to scroll right or left on current page using arrow keys and also page switch using ctrl + [right/left] keys.
If you provide me access to create pull request, I can push my changes up.

from grid.blazor.

gustavnavar avatar gustavnavar commented on May 18, 2024

You should be able to create a pull request, it is not blocked.

from grid.blazor.

gustavnavar avatar gustavnavar commented on May 18, 2024

The new version of GridBlazor package (1.3.3) implements the following keyboard navigation:

  • [Ctrl] + [Left] and [Ctrl] + [Right] arrows navigate between pages
  • [Ctrl] + [Home] key goes to the first page
  • [Ctrl] + [End] key goes to the last page
  • [Ctrl] + [Up] and [Ctrl] + [Down] arrows navigate from one row to another for grids where rows are selectable
  • [Tab] key navigates among elements of a filter widget when it is visible
  • [Esc] key minimises a filter widget when it is visible
  • [Backspace] clear all filters

from grid.blazor.

TheGreenCedar avatar TheGreenCedar commented on May 18, 2024

This is low priority, but may I suggest using another sticky than [Ctrl], or provide the ability to override the bindings?

[Ctrl] + [Left]/ [Ctrl] + [Right] and [Ctrl] + [Backspace] are browser-implemented text editing bindings that allow to respectively skip a word backward/forward or delete the previous word

from grid.blazor.

gustavnavar avatar gustavnavar commented on May 18, 2024

Keyboard navigation currently has an impact on the grid behavior just after loading it. I someone want to leave his/her opinion, just add a comment on #63

from grid.blazor.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.