cozy-ui 127.8.0 → 127.9.0

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.9.0](https://github.com/cozy/cozy-ui/compare/v127.8.0...v127.9.0) (2025-07-31)
2
+
3
+
4
+ ### Features
5
+
6
+ * **VirtualizedTable:** Add `disableClick` prop on column config ([6c68c01](https://github.com/cozy/cozy-ui/commit/6c68c01))
7
+
1
8
  # [127.8.0](https://github.com/cozy/cozy-ui/compare/v127.7.0...v127.8.0) (2025-07-30)
2
9
 
3
10
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "cozy-ui",
3
- "version": "127.8.0",
3
+ "version": "127.9.0",
4
4
  "description": "Cozy apps UI SDK",
5
5
  "main": "./index.js",
6
6
  "bin": {
@@ -65,7 +65,8 @@ const columns = [
65
65
  disablePadding: false,
66
66
  width: 115,
67
67
  label: 'Protein (g)',
68
- textAlign: 'right'
68
+ textAlign: 'right',
69
+ disableClick: true
69
70
  }
70
71
  ]
71
72
 
@@ -20,11 +20,19 @@ const Cell = ({ row, columns, column, onClick, onLongPress, children }) => {
20
20
  const cellContent = get(row, column.id, '—')
21
21
 
22
22
  const longPressRef = useOnLongPress(() => {
23
+ if (column.disableClick) {
24
+ return
25
+ }
26
+
23
27
  setIsLongPress(true)
24
28
  onLongPress?.(row, column)
25
29
  })
26
30
 
27
31
  const handleClick = () => {
32
+ if (column.disableClick) {
33
+ return
34
+ }
35
+
28
36
  if (!isLongPress) {
29
37
  onClick?.(row, column)
30
38
  } else {
@@ -43,11 +43,19 @@ var Cell = function Cell(_ref4) {
43
43
  });
44
44
  var cellContent = get(row, column.id, '—');
45
45
  var longPressRef = useOnLongPress(function () {
46
+ if (column.disableClick) {
47
+ return;
48
+ }
49
+
46
50
  setIsLongPress(true);
47
51
  onLongPress === null || onLongPress === void 0 ? void 0 : onLongPress(row, column);
48
52
  });
49
53
 
50
54
  var handleClick = function handleClick() {
55
+ if (column.disableClick) {
56
+ return;
57
+ }
58
+
51
59
  if (!isLongPress) {
52
60
  onClick === null || onClick === void 0 ? void 0 : onClick(row, column);
53
61
  } else {