Deeply clone rows before passing them back in the table edit row callback to avoid mutating table data
This commit is contained in:
parent
91c2997a6c
commit
7f16e76e8b
|
@ -3,6 +3,7 @@
|
|||
import "@spectrum-css/table/dist/index-vars.css"
|
||||
import CellRenderer from "./CellRenderer.svelte"
|
||||
import SelectEditRenderer from "./SelectEditRenderer.svelte"
|
||||
import { cloneDeep } from "lodash"
|
||||
|
||||
/**
|
||||
* The expected schema is our normal couch schemas for our tables.
|
||||
|
@ -197,7 +198,7 @@
|
|||
|
||||
const editRow = (e, row) => {
|
||||
e.stopPropagation()
|
||||
dispatch("editrow", row)
|
||||
dispatch("editrow", cloneDeep(row))
|
||||
}
|
||||
|
||||
const toggleSelectRow = row => {
|
||||
|
|
Loading…
Reference in New Issue