pixel-react 1.9.7 → 1.9.8
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/lib/index.esm.js +8 -10
- package/lib/index.esm.js.map +1 -1
- package/lib/index.js +8 -10
- package/lib/index.js.map +1 -1
- package/package.json +1 -1
- package/src/components/TableTree/Components/TableCell.tsx +2 -1
- package/src/components/TableTree/TableTree.tsx +3 -5
- package/src/utils/getTreeDetails/getTreeDetails.ts +3 -3
package/package.json
CHANGED
@@ -71,7 +71,8 @@ const TableCell = React.memo(
|
|
71
71
|
>
|
72
72
|
{col.isTree && select === 'checkbox' && (
|
73
73
|
<Checkbox
|
74
|
-
checked={
|
74
|
+
checked={node?.checked || false}
|
75
|
+
partial={node?.checked === 'partial'}
|
75
76
|
onChange={(e) => onCheckBoxChange(e, node)}
|
76
77
|
/>
|
77
78
|
)}
|
@@ -4,7 +4,6 @@ import { TreeTableProps } from './types';
|
|
4
4
|
import TableHead from './Components/TableHead';
|
5
5
|
import TableBody from './Components/TableBody';
|
6
6
|
import { useIntersectionObserver } from '../../hooks/useIntersectionObserver';
|
7
|
-
import functionCheck from '../../utils/functionCheck/functionCheck';
|
8
7
|
import { TreeNodeProps } from '../../ComponentProps/TreeNodeProps';
|
9
8
|
|
10
9
|
const TreeTable: React.FC<TreeTableProps> = ({
|
@@ -28,14 +27,13 @@ const TreeTable: React.FC<TreeTableProps> = ({
|
|
28
27
|
threshold: 0.1,
|
29
28
|
onIntersect: (entry) => {
|
30
29
|
if (entry.isIntersecting) {
|
31
|
-
if (
|
32
|
-
let direction = '
|
30
|
+
if (loadMore) {
|
31
|
+
let direction = 'above';
|
33
32
|
if (entry.target.id === 'ff-table-tree-last-node') {
|
34
|
-
direction = '
|
33
|
+
direction = 'below';
|
35
34
|
}
|
36
35
|
loadMore(direction);
|
37
36
|
}
|
38
|
-
console.log('Element in view:', entry.target.id);
|
39
37
|
}
|
40
38
|
},
|
41
39
|
}
|
@@ -36,9 +36,9 @@ export const getTreeDetails = (
|
|
36
36
|
}
|
37
37
|
break;
|
38
38
|
case 'start':
|
39
|
-
if (
|
40
|
-
root =
|
41
|
-
treeDataList =
|
39
|
+
if (newData.length > 0) {
|
40
|
+
root = newData[0];
|
41
|
+
treeDataList = newData.slice(1);
|
42
42
|
} else {
|
43
43
|
throw new Error('Tree data list is empty, cannot determine root.');
|
44
44
|
}
|