pixel-react 1.10.2 → 1.10.3

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
@@ -14468,6 +14468,7 @@ const AddModule = ({
14468
14468
  error,
14469
14469
  value = ''
14470
14470
  }) => {
14471
+ console.log('🚀 ~ value:', value);
14471
14472
  const [text, setText] = React.useState(value);
14472
14473
  return jsxRuntime.jsxs(jsxRuntime.Fragment, {
14473
14474
  children: [jsxRuntime.jsxs("div", {
@@ -14475,7 +14476,8 @@ const AddModule = ({
14475
14476
  children: [jsxRuntime.jsx("input", {
14476
14477
  type: "text",
14477
14478
  className: "add-module-input",
14478
- onChange: e => setText(e.target.value)
14479
+ onChange: e => setText(e.target.value),
14480
+ value: text
14479
14481
  }), jsxRuntime.jsx(Icon, {
14480
14482
  className: "icons",
14481
14483
  name: "update_icon",
@@ -14485,7 +14487,9 @@ const AddModule = ({
14485
14487
  name: "close",
14486
14488
  onClick: onCancel
14487
14489
  })]
14488
- }), error]
14490
+ }), jsxRuntime.jsx("small", {
14491
+ children: error
14492
+ })]
14489
14493
  });
14490
14494
  };
14491
14495
 
@@ -14542,7 +14546,8 @@ const TableCell = /*#__PURE__*/React.memo(({
14542
14546
  }), node.isNewNode && col.isTree ? jsxRuntime.jsx(AddModule, {
14543
14547
  onCancel: onAddCancel,
14544
14548
  onConfirm: onAddConfirm,
14545
- error: node?.error || ''
14549
+ error: node?.error || '',
14550
+ value: node.value
14546
14551
  }) : jsxRuntime.jsx("span", {
14547
14552
  className: "tree-table-td-content-text",
14548
14553
  children: prepareData(node, col)
@@ -14585,7 +14590,9 @@ const TableRow = /*#__PURE__*/React.memo(({
14585
14590
  const addNewRow = (treeData, newNode) => {
14586
14591
  const {
14587
14592
  sourceId,
14588
- action
14593
+ action,
14594
+ value = '',
14595
+ error = ''
14589
14596
  } = newNode;
14590
14597
  if (!sourceId || !action) return treeData;
14591
14598
  const nodeMap = new Map(treeData.map(node => [node.key, node]));
@@ -14597,7 +14604,9 @@ const addNewRow = (treeData, newNode) => {
14597
14604
  hierarchy: sourceNode.hierarchy,
14598
14605
  sourceId: sourceNode.key,
14599
14606
  isNewNode: true,
14600
- key: 'new-node'
14607
+ key: 'new-node',
14608
+ value,
14609
+ error
14601
14610
  };
14602
14611
  switch (action) {
14603
14612
  case 'addAbove':
@@ -14663,7 +14672,11 @@ const TreeTable = ({
14663
14672
  loadMore = () => {},
14664
14673
  tableBorder,
14665
14674
  height = 'auto',
14666
- newNode = {},
14675
+ newNode = {
14676
+ action: 'addInside',
14677
+ sourceId: 'PAG1013',
14678
+ value: 'newNode'
14679
+ },
14667
14680
  onAddConfirm = _name => {},
14668
14681
  onAddCancel = () => {}
14669
14682
  }) => {