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
686 stars 33 forks source link

Grid row selection - highlight the row #769

Closed vasuamics closed 2 months ago

vasuamics commented 3 months ago

Describe the bug Is it possible to highlight an entire row when selected and to use up and down arrow keys to select a row?

To Reproduce Steps to reproduce the behavior:

  1. Go to '...'
  2. Click on '....'
  3. Scroll down to '....'
  4. See error

Expected behavior A clear and concise description of what you expected to happen.

Screenshots If applicable, add screenshots to help explain your problem.

Versions (please complete the following information):

Sample code Sample code to reproduce the issue.

GitHub repo GitHub repo with minimal code to reproduce the issue.

Desktop (please complete the following information):

Smartphone (please complete the following information):

Additional context Add any other context about the problem here.

gvreddy04 commented 3 months ago

@vasuamics Highlighting rows upon selection can be done. We will do it as an enhancement. However, you cannot currently select rows using the up/down keys.

gvreddy04 commented 3 months ago

@vasuamics In the meantime, you can use the following CSS:

Example 1

Sample CSS:

.bb-table tr:has(input[type=checkbox]:checked){
    background-color: red;
}

Screenshot:

image

Exmaple 2:

Sample CSS:

.bb-table tr:has(input[type=checkbox]:checked){
    background-color: rgba(0,0,0,0.0725);
}

Screenshot:

image