Datatable checkbox deselects items from other pages

54 Views Asked by At

In a table with pagination and checkbox selection, when a row is unchecked, the items from other pages are unchecked as well

This scenario can be seen in the showcase, in the last table, the checkbox table: http://www.primefaces.org:8080/showcase/ui/data/datatable/selection.xhtml

This is the sequence to reproduce the problem:

  1. Check all rows (checkbox "Code" on the table header)
  2. Navigate through the pages, to confirm that all items are checked.
  3. Unselect one item (no matter which page)
  4. Navigate to the other page. All items are unselected

Is this the correct behavior? I think it can be confusing for the user, who marked all and assumes that all of them are selected, except the one that was unchecked.

Is there a way to work around this ?

I already tried setting :

selectionPageOnly="false"
rowSelectMode="add"

I also tried to use the selection mode without checkboxes, same behavior.

Primefaces version: 13.0.5 JSF version: 2.3

Thanks in advance

0

There are 0 best solutions below