Browse Source

Fix bug where save duplicate action was mutating the real context

master
Andrew Kingston 5 years ago
parent
commit
eedd1f0cf6
  1. 2
      packages/client/src/utils/buttonActions.js

2
packages/client/src/utils/buttonActions.js

@ -35,7 +35,7 @@ const saveRowHandler = async (action, context) => {
const duplicateRowHandler = async (action, context) => {
const { fields, providerId, tableId } = action.parameters
if (providerId) {
let draft = context[providerId]
let draft = { ...context[providerId] }
if (fields) {
for (let [field, value] of Object.entries(fields)) {
draft[field] = value

Loading…
Cancel
Save