@tanstack/table-core 8.8.1 → 8.8.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1995,12 +1995,12 @@ const RowSelection = {
1995
1995
  return isAllRowsSelected;
1996
1996
  },
1997
1997
  getIsAllPageRowsSelected: () => {
1998
- const paginationFlatRows = table.getPaginationRowModel().flatRows;
1998
+ const paginationFlatRows = table.getPaginationRowModel().flatRows.filter(row => row.getCanSelect());
1999
1999
  const {
2000
2000
  rowSelection
2001
2001
  } = table.getState();
2002
2002
  let isAllPageRowsSelected = !!paginationFlatRows.length;
2003
- if (isAllPageRowsSelected && paginationFlatRows.some(row => row.getCanSelect() && !rowSelection[row.id])) {
2003
+ if (isAllPageRowsSelected && paginationFlatRows.some(row => !rowSelection[row.id])) {
2004
2004
  isAllPageRowsSelected = false;
2005
2005
  }
2006
2006
  return isAllPageRowsSelected;
@@ -2012,7 +2012,7 @@ const RowSelection = {
2012
2012
  },
2013
2013
  getIsSomePageRowsSelected: () => {
2014
2014
  const paginationFlatRows = table.getPaginationRowModel().flatRows;
2015
- return table.getIsAllPageRowsSelected() ? false : paginationFlatRows.some(d => d.getIsSelected() || d.getIsSomeSelected());
2015
+ return table.getIsAllPageRowsSelected() ? false : paginationFlatRows.filter(row => row.getCanSelect()).some(d => d.getIsSelected() || d.getIsSomeSelected());
2016
2016
  },
2017
2017
  getToggleAllRowsSelectedHandler: () => {
2018
2018
  return e => {