vikramlearning / blazorbootstrap

An Enterprise-class Blazor Bootstrap Component library built on the Blazor and Bootstrap CSS frameworks.
https://docs.blazorbootstrap.com/
Apache License 2.0
670 stars 32 forks source link

Grid Component: Keypress event #471

Open joselitogatchalianalonzo opened 9 months ago

joselitogatchalianalonzo commented 9 months ago

Hi @gvreddy04 I'm using the Grid component as a search box for items like products, customers etc. To select an item, I need to use mouse and click the item I choose. It will be good if I can navigate through the list of items by pressing Down and Up arrow keys and press ENTER on the item I want to select. There are some users who prefer to use keyboard rather than mouse in data entry. I hope you can add this enhancement.

gvreddy04 commented 9 months ago

@joselitogatchalianalonzo I'd appreciate it if you could share a sample screenshot of the current implementation, specifically the search box with the grid layout. This would be really helpful for me to get a better understanding. Ideally, if you could also provide a sample code snippet that I can test quickly, that would be fantastic!

joselitogatchalianalonzo commented 9 months ago

Hi @gvreddy04 Below is the screen shot of Search Box component I created. Currently, user need to click the row of item to be selected using mouse. I'm using RowClick event to take action on the item selected. What I prefer is user can navigate through the list of items by pressing Down and Up arrow keys and press ENTER on the item to be selected. It would also be great if I can automatically set focus on the filter text box upon opening the Modal.

image

I also attached here the text file for Razor and CS file of the component I created. SearchCompRazor.txt SearchCompCS.txt

gvreddy04 commented 9 months ago

@joselitogatchalianalonzo It's great to see the applications and use cases you've built with BlazorBootstrap. We'll consider these enhancements in future releases.

joselitogatchalianalonzo commented 9 months ago

Thanks @gvreddy04 I'm looking forward to it.