ywana-core8 0.0.817 → 0.0.819

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,6 +1,6 @@
1
1
  {
2
2
  "name": "ywana-core8",
3
- "version": "0.0.817",
3
+ "version": "0.0.819",
4
4
  "description": "ywana-core8",
5
5
  "homepage": "https://ywana.github.io/workspace",
6
6
  "author": "Ernesto Roldan Garcia",
@@ -454,7 +454,7 @@ const CollectionAdder = ({ item, onAdd }) => {
454
454
  if (onAdd) {
455
455
  const next = Object.assign({}, form, { [cellId]: cellValue })
456
456
  delete next.actions
457
- setForm(next)
457
+ setForm(structuredClone(next))
458
458
  }
459
459
  }
460
460
 
@@ -488,16 +488,8 @@ const TableEditor = (props) => {
488
488
  const [groupBy, setGroupBy] = useState(props.groupBy)
489
489
 
490
490
  function change(id, value) {
491
- const nextData = data.map(row => {
492
- if (row.id === id) {
493
- const next = Object.assign({}, row, { [id]: value })
494
- delete next.actions
495
- delete next.undefined
496
- return next
497
- } else {
498
- return row
499
- }
500
- })
491
+ const nextData = structuredClone(data)
492
+ nextData[id] = value
501
493
  if (onChange) onChange(field.id, nextData)
502
494
  }
503
495