1
0
Fork 0
mirror of synced 2024-09-10 22:46:09 +12:00

Use search endpoint instead of get endpoint to fetch individual rows so that relationship enrichment occurs

This commit is contained in:
Andrew Kingston 2023-02-28 14:53:11 +00:00
parent c83286cb61
commit 4c70959327

View file

@ -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 }