Merge remote-tracking branch 'origin/develop' into feat/relationship-configuration
This commit is contained in:
commit
bcd9357218
|
@ -1,5 +1,5 @@
|
||||||
{
|
{
|
||||||
"version": "2.10.16-alpha.7",
|
"version": "2.10.16-alpha.10",
|
||||||
"npmClient": "yarn",
|
"npmClient": "yarn",
|
||||||
"packages": [
|
"packages": [
|
||||||
"packages/*"
|
"packages/*"
|
||||||
|
|
|
@ -121,7 +121,12 @@
|
||||||
if (!Array.isArray(values)) {
|
if (!Array.isArray(values)) {
|
||||||
values = [values]
|
values = [values]
|
||||||
}
|
}
|
||||||
return values.map(value => (typeof value === "object" ? value._id : value))
|
values = values.map(value =>
|
||||||
|
typeof value === "object" ? value._id : value
|
||||||
|
)
|
||||||
|
// Make sure field state is valid
|
||||||
|
fieldApi.setValue(values)
|
||||||
|
return values
|
||||||
}
|
}
|
||||||
|
|
||||||
const getDisplayName = row => {
|
const getDisplayName = row => {
|
||||||
|
|
|
@ -72,10 +72,15 @@ export async function patch(ctx: UserCtx<PatchRowRequest, PatchRowResponse>) {
|
||||||
id: breakRowIdField(_id),
|
id: breakRowIdField(_id),
|
||||||
row: dataToUpdate,
|
row: dataToUpdate,
|
||||||
})
|
})
|
||||||
const row = await outputProcessing(table, response.row)
|
const row = await sdk.rows.external.getRow(tableId, _id, {
|
||||||
|
relationships: true,
|
||||||
|
})
|
||||||
|
const enrichedRow = await outputProcessing(table, row, {
|
||||||
|
preserveLinks: true,
|
||||||
|
})
|
||||||
return {
|
return {
|
||||||
...response,
|
...response,
|
||||||
row,
|
row: enrichedRow,
|
||||||
table,
|
table,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -116,7 +121,7 @@ export async function save(ctx: UserCtx) {
|
||||||
})
|
})
|
||||||
return {
|
return {
|
||||||
...response,
|
...response,
|
||||||
row: await outputProcessing(table, row),
|
row: await outputProcessing(table, row, { preserveLinks: true }),
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
return response
|
return response
|
||||||
|
|
|
@ -77,7 +77,7 @@ export async function search(options: SearchParams) {
|
||||||
}
|
}
|
||||||
|
|
||||||
const table = await sdk.tables.getTable(tableId)
|
const table = await sdk.tables.getTable(tableId)
|
||||||
rows = await outputProcessing(table, rows)
|
rows = await outputProcessing(table, rows, { preserveLinks: true })
|
||||||
|
|
||||||
// need wrapper object for bookmarks etc when paginating
|
// need wrapper object for bookmarks etc when paginating
|
||||||
return { rows, hasNextPage, bookmark: bookmark && bookmark + 1 }
|
return { rows, hasNextPage, bookmark: bookmark && bookmark + 1 }
|
||||||
|
@ -174,7 +174,7 @@ export async function fetch(tableId: string) {
|
||||||
includeSqlRelationships: IncludeRelationship.INCLUDE,
|
includeSqlRelationships: IncludeRelationship.INCLUDE,
|
||||||
})
|
})
|
||||||
const table = await sdk.tables.getTable(tableId)
|
const table = await sdk.tables.getTable(tableId)
|
||||||
return await outputProcessing(table, response)
|
return await outputProcessing(table, response, { preserveLinks: true })
|
||||||
}
|
}
|
||||||
|
|
||||||
export async function fetchView(viewName: string) {
|
export async function fetchView(viewName: string) {
|
||||||
|
|
Loading…
Reference in New Issue