@panneau/core 3.0.150 → 3.0.152

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.
package/es/hooks.js CHANGED
@@ -1203,7 +1203,7 @@ var useItemSelection = function useItemSelection(_ref) {
1203
1203
  var _ref12 = it || {},
1204
1204
  _ref12$id = _ref12.id,
1205
1205
  id = _ref12$id === void 0 ? null : _ref12$id;
1206
- return ids.indexOf(id) !== -1;
1206
+ return (ids || []).indexOf(id) !== -1;
1207
1207
  });
1208
1208
  return currentPageItems.length === (items || []).length && currentPageItems.length > 0;
1209
1209
  }, [selectedItems, items]);
@@ -1213,6 +1213,7 @@ var useItemSelection = function useItemSelection(_ref) {
1213
1213
  var selectedCount = useMemo(function () {
1214
1214
  return selectedItems !== null && selectedItems.length > 0 ? selectedItems.length : null;
1215
1215
  }, [selectedItems]);
1216
+ console.log('selectedCount', selectedCount);
1216
1217
  return {
1217
1218
  onSelectItem: onSelectItem,
1218
1219
  onSelectPage: onSelectPage,
package/lib/hooks.js CHANGED
@@ -1205,7 +1205,7 @@ var useItemSelection = function useItemSelection(_ref) {
1205
1205
  var _ref12 = it || {},
1206
1206
  _ref12$id = _ref12.id,
1207
1207
  id = _ref12$id === void 0 ? null : _ref12$id;
1208
- return ids.indexOf(id) !== -1;
1208
+ return (ids || []).indexOf(id) !== -1;
1209
1209
  });
1210
1210
  return currentPageItems.length === (items || []).length && currentPageItems.length > 0;
1211
1211
  }, [selectedItems, items]);
@@ -1215,6 +1215,7 @@ var useItemSelection = function useItemSelection(_ref) {
1215
1215
  var selectedCount = react.useMemo(function () {
1216
1216
  return selectedItems !== null && selectedItems.length > 0 ? selectedItems.length : null;
1217
1217
  }, [selectedItems]);
1218
+ console.log('selectedCount', selectedCount);
1218
1219
  return {
1219
1220
  onSelectItem: onSelectItem,
1220
1221
  onSelectPage: onSelectPage,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@panneau/core",
3
- "version": "3.0.150",
3
+ "version": "3.0.152",
4
4
  "description": "",
5
5
  "keywords": [
6
6
  "javascript"
@@ -111,5 +111,5 @@
111
111
  "publishConfig": {
112
112
  "access": "public"
113
113
  },
114
- "gitHead": "a871528cf4f2a9a04e62f7920d9ac288e95e6104"
114
+ "gitHead": "a42fc2c7e7dc36502823846954bc2a3f20f164f6"
115
115
  }