pixel-react 1.10.10-1 → 1.10.10-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.
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "pixel-react",
3
3
  "description": "Great for pixel-perfect, design-focused components in React",
4
- "version": "1.10.10-1",
4
+ "version": "1.10.10-2",
5
5
  "main": "lib/index.js",
6
6
  "module": "lib/index.esm.js",
7
7
  "types": "lib/index.d.ts",
@@ -19,7 +19,7 @@ const renderSpaces = (
19
19
  isLastNode = false;
20
20
 
21
21
  if (!isNaN(level)) {
22
- siblingsArray = Array(level).fill(true);
22
+ siblingsArray = Array(level - 1).fill(true);
23
23
  }
24
24
  }
25
25
 
@@ -97,8 +97,8 @@ const TableCell = React.memo(
97
97
  {col.isTree && select === 'radio' && (
98
98
  <RadioButton
99
99
  name={node.title}
100
- checked={selected.includes(node.id)}
101
- value={node.id}
100
+ checked={selected.includes(node.key)}
101
+ value={node.key}
102
102
  onChange={(e) => onCheckBoxChange(e, node)}
103
103
  />
104
104
  )}
@@ -44,8 +44,8 @@ const TreeTable: React.FC<TreeTableProps> = ({
44
44
  if (!scrollContainer || !firstNode || !lastNode || !treeData?.length)
45
45
  return;
46
46
 
47
- const isLastResourceAbove = treeData[0]?.lastResource;
48
- const isLastResourceBelow = treeData[treeData.length - 1]?.lastResource;
47
+ const isLastResourceAbove = !!treeData[0]?.lastResource;
48
+ const isLastResourceBelow = !!treeData[treeData.length - 1]?.lastResource;
49
49
 
50
50
  // Skip pagination if both last resources are present
51
51
  if (isLastResourceAbove && isLastResourceBelow) return;