From 4c70959327cb4e08cb956b512661b7e58b4fe779 Mon Sep 17 00:00:00 2001 From: Andrew Kingston Date: Tue, 28 Feb 2023 14:53:11 +0000 Subject: [PATCH] Use search endpoint instead of get endpoint to fetch individual rows so that relationship enrichment occurs --- .../src/components/sheet/stores/rows.js | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/packages/frontend-core/src/components/sheet/stores/rows.js b/packages/frontend-core/src/components/sheet/stores/rows.js index fbfe15822b..e46bc36c50 100644 --- a/packages/frontend-core/src/components/sheet/stores/rows.js +++ b/packages/frontend-core/src/components/sheet/stores/rows.js @@ -133,10 +133,19 @@ export const createRowsStore = context => { } // Fetch row from the server again - newRow = await API.fetchRow({ + const res = await API.searchTable({ tableId: get(tableId), - rowId: row._id, + limit: 1, + query: { + equal: { + _id: row._id, + }, + }, + paginate: false, }) + if (res?.rows?.[0]) { + newRow = res?.rows?.[0] + } // Update state again with this row newRow = { ...newRow, __idx: row.__idx }