(core) forward more kinds of edits to a virtual table

Summary:
Some edits to virtual tables (such as webhook lists) happen
via a route that was not yet handled. Actually Cyprien (the
original author) had handled this case but it got removed
because I didn't know what it was for :-). This brings back
support for edits by this route.

Test Plan: added a test

Reviewers: georgegevoian

Reviewed By: georgegevoian

Differential Revision: https://phab.getgrist.com/D3924
This commit is contained in:
Paul Fitzpatrick
2023-06-15 16:12:19 -04:00
parent d88f79bc5e
commit 7d3b4b49d5
3 changed files with 34 additions and 6 deletions

View File

@@ -90,11 +90,11 @@ export function isSchemaAction(action: DocAction):
return SCHEMA_ACTIONS.has(action[0]);
}
export function isDataAction(action: DocAction):
export function isDataAction(action: DocAction|UserAction):
action is AddRecord | RemoveRecord | UpdateRecord |
BulkAddRecord | BulkRemoveRecord | BulkUpdateRecord |
ReplaceTableData | TableDataAction {
return DATA_ACTIONS.has(action[0]);
return DATA_ACTIONS.has(String(action[0]));
}
/**