cozy-ui 127.10.0 → 127.10.1

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/CHANGELOG.md CHANGED
@@ -1,3 +1,10 @@
1
+ ## [127.10.1](https://github.com/cozy/cozy-ui/compare/v127.10.0...v127.10.1) (2025-08-18)
2
+
3
+
4
+ ### Bug Fixes
5
+
6
+ * Reorganize virtualized grid list to render item content :bug: ([62cf105](https://github.com/cozy/cozy-ui/commit/62cf105))
7
+
1
8
  # [127.10.0](https://github.com/cozy/cozy-ui/compare/v127.9.0...v127.10.0) (2025-07-31)
2
9
 
3
10
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "cozy-ui",
3
- "version": "127.10.0",
3
+ "version": "127.10.1",
4
4
  "description": "Cozy apps UI SDK",
5
5
  "main": "./index.js",
6
6
  "bin": {
@@ -41,13 +41,13 @@ const VirtualizedGridListDnd = ({
41
41
  <div {...scrollerProps} ref={ref} />
42
42
  </DnDConfigWrapper>
43
43
  )),
44
- Item: ({ context, children, ...props }) => {
44
+ Item: ({ context, ...props }) => {
45
45
  const item = context?.items?.[props['data-index']]
46
46
  return (
47
47
  <GridItem
48
48
  item={item}
49
49
  context={context}
50
- renderItem={() => <>{children}</>}
50
+ renderItem={itemRenderer}
51
51
  {...componentProps.Item}
52
52
  />
53
53
  )
@@ -55,7 +55,6 @@ const VirtualizedGridListDnd = ({
55
55
  ...components
56
56
  }}
57
57
  context={_context}
58
- itemRenderer={itemRenderer}
59
58
  {...props}
60
59
  >
61
60
  {children}
@@ -2,7 +2,7 @@ import React, { forwardRef } from 'react'
2
2
  import { VirtuosoGrid } from 'react-virtuoso'
3
3
 
4
4
  const VirtualizedGridList = forwardRef(
5
- ({ items = [], itemRenderer, components, context, ...props }, ref) => {
5
+ ({ items = [], components, context, ...props }, ref) => {
6
6
  return (
7
7
  <VirtuosoGrid
8
8
  ref={ref}
@@ -10,7 +10,6 @@ const VirtualizedGridList = forwardRef(
10
10
  context={context}
11
11
  style={{ height: '100%' }}
12
12
  totalCount={items.length}
13
- itemContent={index => itemRenderer(items[index])}
14
13
  {...props}
15
14
  />
16
15
  )
@@ -3,7 +3,7 @@ import _defineProperty from "@babel/runtime/helpers/defineProperty";
3
3
  import _slicedToArray from "@babel/runtime/helpers/slicedToArray";
4
4
  import _objectWithoutProperties from "@babel/runtime/helpers/objectWithoutProperties";
5
5
  var _excluded = ["dragProps", "context", "itemRenderer", "children", "componentProps", "components"],
6
- _excluded2 = ["context", "children"];
6
+ _excluded2 = ["context"];
7
7
 
8
8
  function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
9
9
 
@@ -60,21 +60,17 @@ var VirtualizedGridListDnd = function VirtualizedGridListDnd(_ref) {
60
60
  var _context$items;
61
61
 
62
62
  var context = _ref3.context,
63
- children = _ref3.children,
64
63
  props = _objectWithoutProperties(_ref3, _excluded2);
65
64
 
66
65
  var item = context === null || context === void 0 ? void 0 : (_context$items = context.items) === null || _context$items === void 0 ? void 0 : _context$items[props['data-index']];
67
66
  return /*#__PURE__*/React.createElement(GridItem, _extends({
68
67
  item: item,
69
68
  context: context,
70
- renderItem: function renderItem() {
71
- return /*#__PURE__*/React.createElement(React.Fragment, null, children);
72
- }
69
+ renderItem: itemRenderer
73
70
  }, componentProps.Item));
74
71
  }
75
72
  }, components),
76
- context: _context,
77
- itemRenderer: itemRenderer
73
+ context: _context
78
74
  }, props), children));
79
75
  };
80
76
 
@@ -1,12 +1,11 @@
1
1
  import _extends from "@babel/runtime/helpers/extends";
2
2
  import _objectWithoutProperties from "@babel/runtime/helpers/objectWithoutProperties";
3
- var _excluded = ["items", "itemRenderer", "components", "context"];
3
+ var _excluded = ["items", "components", "context"];
4
4
  import React, { forwardRef } from 'react';
5
5
  import { VirtuosoGrid } from 'react-virtuoso';
6
6
  var VirtualizedGridList = /*#__PURE__*/forwardRef(function (_ref, ref) {
7
7
  var _ref$items = _ref.items,
8
8
  items = _ref$items === void 0 ? [] : _ref$items,
9
- itemRenderer = _ref.itemRenderer,
10
9
  components = _ref.components,
11
10
  context = _ref.context,
12
11
  props = _objectWithoutProperties(_ref, _excluded);
@@ -18,10 +17,7 @@ var VirtualizedGridList = /*#__PURE__*/forwardRef(function (_ref, ref) {
18
17
  style: {
19
18
  height: '100%'
20
19
  },
21
- totalCount: items.length,
22
- itemContent: function itemContent(index) {
23
- return itemRenderer(items[index]);
24
- }
20
+ totalCount: items.length
25
21
  }, props));
26
22
  });
27
23
  VirtualizedGridList.displayName = 'VirtualizedGridList';