@tanstack/react-table 8.8.1 → 8.8.4

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.
@@ -955,19 +955,19 @@
955
955
  };
956
956
 
957
957
  const includesString = (row, columnId, filterValue) => {
958
- var _row$getValue;
958
+ var _row$getValue, _row$getValue$toStrin, _row$getValue$toStrin2;
959
959
  const search = filterValue.toLowerCase();
960
- return Boolean((_row$getValue = row.getValue(columnId)) == null ? void 0 : _row$getValue.toLowerCase().includes(search));
960
+ return Boolean((_row$getValue = row.getValue(columnId)) == null ? void 0 : (_row$getValue$toStrin = _row$getValue.toString()) == null ? void 0 : (_row$getValue$toStrin2 = _row$getValue$toStrin.toLowerCase()) == null ? void 0 : _row$getValue$toStrin2.includes(search));
961
961
  };
962
962
  includesString.autoRemove = val => testFalsey(val);
963
963
  const includesStringSensitive = (row, columnId, filterValue) => {
964
- var _row$getValue2;
965
- return Boolean((_row$getValue2 = row.getValue(columnId)) == null ? void 0 : _row$getValue2.includes(filterValue));
964
+ var _row$getValue2, _row$getValue2$toStri;
965
+ return Boolean((_row$getValue2 = row.getValue(columnId)) == null ? void 0 : (_row$getValue2$toStri = _row$getValue2.toString()) == null ? void 0 : _row$getValue2$toStri.includes(filterValue));
966
966
  };
967
967
  includesStringSensitive.autoRemove = val => testFalsey(val);
968
968
  const equalsString = (row, columnId, filterValue) => {
969
- var _row$getValue3;
970
- return ((_row$getValue3 = row.getValue(columnId)) == null ? void 0 : _row$getValue3.toLowerCase()) === filterValue.toLowerCase();
969
+ var _row$getValue3, _row$getValue3$toStri;
970
+ return ((_row$getValue3 = row.getValue(columnId)) == null ? void 0 : (_row$getValue3$toStri = _row$getValue3.toString()) == null ? void 0 : _row$getValue3$toStri.toLowerCase()) === (filterValue == null ? void 0 : filterValue.toLowerCase());
971
971
  };
972
972
  equalsString.autoRemove = val => testFalsey(val);
973
973
  const arrIncludes = (row, columnId, filterValue) => {
@@ -2030,12 +2030,12 @@
2030
2030
  return isAllRowsSelected;
2031
2031
  },
2032
2032
  getIsAllPageRowsSelected: () => {
2033
- const paginationFlatRows = table.getPaginationRowModel().flatRows;
2033
+ const paginationFlatRows = table.getPaginationRowModel().flatRows.filter(row => row.getCanSelect());
2034
2034
  const {
2035
2035
  rowSelection
2036
2036
  } = table.getState();
2037
2037
  let isAllPageRowsSelected = !!paginationFlatRows.length;
2038
- if (isAllPageRowsSelected && paginationFlatRows.some(row => row.getCanSelect() && !rowSelection[row.id])) {
2038
+ if (isAllPageRowsSelected && paginationFlatRows.some(row => !rowSelection[row.id])) {
2039
2039
  isAllPageRowsSelected = false;
2040
2040
  }
2041
2041
  return isAllPageRowsSelected;
@@ -2047,7 +2047,7 @@
2047
2047
  },
2048
2048
  getIsSomePageRowsSelected: () => {
2049
2049
  const paginationFlatRows = table.getPaginationRowModel().flatRows;
2050
- return table.getIsAllPageRowsSelected() ? false : paginationFlatRows.some(d => d.getIsSelected() || d.getIsSomeSelected());
2050
+ return table.getIsAllPageRowsSelected() ? false : paginationFlatRows.filter(row => row.getCanSelect()).some(d => d.getIsSelected() || d.getIsSomeSelected());
2051
2051
  },
2052
2052
  getToggleAllRowsSelectedHandler: () => {
2053
2053
  return e => {