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.js CHANGED
@@ -14471,7 +14471,8 @@ const TableCell = /*#__PURE__*/React.memo(({
14471
14471
  }), jsxRuntime.jsxs("span", {
14472
14472
  className: `tree-table-td-content ${col.isTree && node.folder ? 'folder' : ''}`,
14473
14473
  children: [col.isTree && select === 'checkbox' && jsxRuntime.jsx(Checkbox, {
14474
- checked: selected.includes(node.id),
14474
+ checked: node?.checked || false,
14475
+ partial: node?.checked === 'partial',
14475
14476
  onChange: e => onCheckBoxChange(e, node)
14476
14477
  }), col.isTree && select === 'radio' && jsxRuntime.jsx(RadioButton, {
14477
14478
  name: node.title,
@@ -14538,8 +14539,6 @@ const TableBody = /*#__PURE__*/React.memo(({
14538
14539
  })]
14539
14540
  }));
14540
14541
 
14541
- const functionCheck = functionToCheck => !checkEmpty(functionToCheck) && functionToCheck && {}.toString.call(functionToCheck) === '[object Function]';
14542
-
14543
14542
  const TreeTable = ({
14544
14543
  treeData,
14545
14544
  columnsData,
@@ -14559,14 +14558,13 @@ const TreeTable = ({
14559
14558
  threshold: 0.1,
14560
14559
  onIntersect: entry => {
14561
14560
  if (entry.isIntersecting) {
14562
- if (functionCheck(loadMore)) {
14563
- let direction = 'up';
14561
+ if (loadMore) {
14562
+ let direction = 'above';
14564
14563
  if (entry.target.id === 'ff-table-tree-last-node') {
14565
- direction = 'down';
14564
+ direction = 'below';
14566
14565
  }
14567
14566
  loadMore(direction);
14568
14567
  }
14569
- console.log('Element in view:', entry.target.id);
14570
14568
  }
14571
14569
  }
14572
14570
  });
@@ -53892,9 +53890,9 @@ const getTreeDetails = (action, oldData, newData, index) => {
53892
53890
  }
53893
53891
  break;
53894
53892
  case 'start':
53895
- if (oldData.length > 0) {
53896
- root = oldData[0];
53897
- treeDataList = oldData.slice(1);
53893
+ if (newData.length > 0) {
53894
+ root = newData[0];
53895
+ treeDataList = newData.slice(1);
53898
53896
  } else {
53899
53897
  throw new Error('Tree data list is empty, cannot determine root.');
53900
53898
  }