Reworked toggles, again, to try and catch more edge cases. Made toggles set the inactive status of their property children in the compute step instead of the inactive denormalisation step

This commit is contained in:
Stefan Zermatten
2021-03-01 11:41:59 +02:00
parent e617ef9b75
commit 3517636b8b
11 changed files with 36 additions and 19 deletions

View File

@@ -19,7 +19,14 @@ export default function writeAlteredProperties(memo){
ids.forEach(id => {
let op = undefined;
let original = memo.originalPropsById[id];
let keys = ['dependencies', ...schema.objectKeys()];
let keys = [
'dependencies',
'inactive',
'deactivatedBySelf',
'deactivatedByAncestor',
'deactivatedByToggle',
...schema.objectKeys(),
];
op = addChangedKeysToOp(op, keys, original, changed);
if (op){
bulkWriteOperations.push(op);