From 7343c947ae6270019ebdc8b4a5db41c654eb47b2 Mon Sep 17 00:00:00 2001 From: Andrew Kingston Date: Thu, 22 Jul 2021 16:50:35 +0100 Subject: [PATCH] Use tableId parameter when saving rows from button action --- packages/client/src/utils/buttonActions.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/packages/client/src/utils/buttonActions.js b/packages/client/src/utils/buttonActions.js index 9ad0a23616..af4826a1c4 100644 --- a/packages/client/src/utils/buttonActions.js +++ b/packages/client/src/utils/buttonActions.js @@ -4,7 +4,7 @@ import { saveRow, deleteRow, executeQuery, triggerAutomation } from "../api" import { ActionTypes } from "../constants" const saveRowHandler = async (action, context) => { - const { fields, providerId } = action.parameters + const { fields, providerId, tableId } = action.parameters if (providerId) { let draft = context[providerId] if (fields) { @@ -12,6 +12,9 @@ const saveRowHandler = async (action, context) => { draft[field] = value } } + if (tableId) { + draft.tableId = tableId + } await saveRow(draft) } }