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

DataTable: selectionMode=multiple with rowSelectMode=none still shows cursor pointer #9429

Closed
FlipWarthog opened this issue Nov 21, 2022 · 5 comments · Fixed by #9434
Closed
Assignees
Labels
🐞 defect Bug...Something isn't working workaround A workaround has been provided
Milestone

Comments

@FlipWarthog
Copy link
Contributor

Describe the bug

DataTable Checkbox selection with rowSelectMode="none" still sets the cursor: pointer style on hover of the entire row, despite only being able to select via the Checkbox.

Reproducer

This issue can be reproduced running the showcase locally. Modify the Checkbox example in the ui/data/datatable/selection.xhtml showcase page and set rowSelectMode="none". Run the showcase and hover the rows in that example.

Expected behavior

If a row cannot be selected by clicking on the row itself, the cursor should remain as the arrow rather than changing to a pointer.

PrimeFaces edition

Community

PrimeFaces version

13.0.0

Theme

All

JSF implementation

All

JSF version

2.3

Java version

11

Browser(s)

All

@FlipWarthog FlipWarthog added ‼️ needs-triage Issue needs triaging 🐞 defect Bug...Something isn't working labels Nov 21, 2022
@melloware
Copy link
Member

looks like its this in the themes.

body .ui-datatable .ui-datatable-data>tr.ui-datatable-selectable {
    cursor: pointer;
}

@melloware melloware added theme Is this a theme specific issue and removed 🐞 defect Bug...Something isn't working ‼️ needs-triage Issue needs triaging labels Nov 21, 2022
@melloware
Copy link
Member

Actually its this line...

.add(allowSelection, DataTable.SELECTABLE_ROW_CLASS)

@melloware melloware self-assigned this Nov 21, 2022
@melloware melloware added this to the 13.0.0 milestone Nov 21, 2022
@melloware melloware added 🐞 defect Bug...Something isn't working and removed theme Is this a theme specific issue labels Nov 21, 2022
melloware added a commit to melloware/primefaces that referenced this issue Nov 21, 2022
@melloware
Copy link
Member

Workaround:

body .ui-datatable .ui-datatable-data > tr.ui-datatable-selectable {
  cursor: auto;
}

@melloware melloware added the workaround A workaround has been provided label Nov 22, 2022
@melloware
Copy link
Member

Because rowSelectMode doesn't put anythng in the DOM there is nothing to select or remove. So this CSS style is applied to selectable rows. If you turn selection off then the whole row including the checkbox becomes unselectable.

@FlipWarthog
Copy link
Contributor Author

Workaround works like a charm, thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🐞 defect Bug...Something isn't working workaround A workaround has been provided
Projects
None yet
2 participants