Updating tests and re-formatting.
This commit is contained in:
parent
763f7b3321
commit
dc9552dbad
|
@ -52,7 +52,7 @@
|
|||
onOk={deleteRow}
|
||||
title="Confirm Delete" />
|
||||
<Modal bind:this={modal}>
|
||||
<CreateEditRowModal row={row} />
|
||||
<CreateEditRowModal {row} />
|
||||
</Modal>
|
||||
|
||||
<style>
|
||||
|
|
|
@ -36,7 +36,7 @@
|
|||
title={table.name}
|
||||
icon="ri-table-fill"
|
||||
on:click={() => selectTable(table)}>
|
||||
<EditTablePopover table={table} />
|
||||
<EditTablePopover {table} />
|
||||
</ListItem>
|
||||
{#each Object.keys(table.views || {}) as viewName}
|
||||
<ListItem
|
||||
|
|
|
@ -86,8 +86,8 @@
|
|||
<div class="root">
|
||||
{#if idFields.length === 0}
|
||||
<div class="cannot-use">
|
||||
Update row can only be used within a component that provides data, such
|
||||
as a List
|
||||
Update row can only be used within a component that provides data, such as
|
||||
a List
|
||||
</div>
|
||||
{:else}
|
||||
<Label size="m" color="dark">Row Id</Label>
|
||||
|
|
|
@ -218,8 +218,7 @@ exports.destroy = async function(ctx) {
|
|||
|
||||
// for automations include the row that was deleted
|
||||
ctx.row = row
|
||||
ctx.eventEmitter &&
|
||||
ctx.eventEmitter.emitRow(`row:delete`, instanceId, row)
|
||||
ctx.eventEmitter && ctx.eventEmitter.emitRow(`row:delete`, instanceId, row)
|
||||
}
|
||||
|
||||
exports.validate = async function(ctx) {
|
||||
|
|
|
@ -116,9 +116,7 @@ exports.destroy = async function(ctx) {
|
|||
include_docs: true,
|
||||
})
|
||||
)
|
||||
await db.bulkDocs(
|
||||
rows.rows.map(row => ({ _id: row.id, _deleted: true }))
|
||||
)
|
||||
await db.bulkDocs(rows.rows.map(row => ({ _id: row.id, _deleted: true })))
|
||||
|
||||
// update linked rows
|
||||
await linkRows.updateLinks({
|
||||
|
|
|
@ -12,7 +12,6 @@ Object {
|
|||
"field": "myField",
|
||||
"filters": Array [],
|
||||
"groupBy": undefined,
|
||||
"tableId": "14f1c4e94d6a47b682ce89d35d4c78b0",
|
||||
"schema": Object {
|
||||
"avg": Object {
|
||||
"type": "number",
|
||||
|
@ -36,6 +35,7 @@ Object {
|
|||
"type": "number",
|
||||
},
|
||||
},
|
||||
"tableId": "14f1c4e94d6a47b682ce89d35d4c78b0",
|
||||
},
|
||||
"reduce": "_stats",
|
||||
}
|
||||
|
@ -65,8 +65,8 @@ Object {
|
|||
},
|
||||
],
|
||||
"groupBy": undefined,
|
||||
"tableId": "14f1c4e94d6a47b682ce89d35d4c78b0",
|
||||
"schema": null,
|
||||
"tableId": "14f1c4e94d6a47b682ce89d35d4c78b0",
|
||||
},
|
||||
}
|
||||
`;
|
||||
|
@ -83,8 +83,8 @@ Object {
|
|||
"field": "score",
|
||||
"filters": Array [],
|
||||
"groupBy": "age",
|
||||
"tableId": "14f1c4e94d6a47b682ce89d35d4c78b0",
|
||||
"schema": null,
|
||||
"tableId": "14f1c4e94d6a47b682ce89d35d4c78b0",
|
||||
},
|
||||
"reduce": "_stats",
|
||||
}
|
||||
|
|
|
@ -67,9 +67,7 @@ exports.getRowParams = (tableId, rowId = null, otherProps = {}) => {
|
|||
throw "Cannot build params for rows without a table ID"
|
||||
}
|
||||
const endOfKey =
|
||||
rowId == null
|
||||
? `${tableId}${SEPARATOR}`
|
||||
: `${tableId}${SEPARATOR}${rowId}`
|
||||
rowId == null ? `${tableId}${SEPARATOR}` : `${tableId}${SEPARATOR}${rowId}`
|
||||
return getDocParams(DocumentTypes.ROW, endOfKey, otherProps)
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue