From 5266d80afe559a3f964ee8e65a926c0e2dffcf1a Mon Sep 17 00:00:00 2001 From: Dean Date: Thu, 26 Oct 2023 16:09:01 +0100 Subject: [PATCH] Fix to ensure single integer ids are parsed correctly --- packages/client/src/utils/buttonActions.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/packages/client/src/utils/buttonActions.js b/packages/client/src/utils/buttonActions.js index 18d6b3de3c..9b4640dbb4 100644 --- a/packages/client/src/utils/buttonActions.js +++ b/packages/client/src/utils/buttonActions.js @@ -103,7 +103,6 @@ const fetchRowHandler = async action => { const deleteRowHandler = async action => { const { tableId, rowId: rowConfig, notificationOverride } = action.parameters - if (tableId && rowConfig) { try { let requestConfig @@ -129,9 +128,11 @@ const deleteRowHandler = async action => { requestConfig = [parsedRowConfig] } else if (Array.isArray(parsedRowConfig)) { requestConfig = parsedRowConfig + } else if (Number.isInteger(parsedRowConfig)) { + requestConfig = [String(parsedRowConfig)] } - if (!requestConfig.length) { + if (!requestConfig && !parsedRowConfig) { notificationStore.actions.warning("No valid rows were supplied") return false }