aboutsummaryrefslogtreecommitdiff
path: root/src/fields/List.ts
diff options
context:
space:
mode:
authorbobzel <zzzman@gmail.com>2022-10-28 14:14:05 -0400
committerbobzel <zzzman@gmail.com>2022-10-28 14:14:05 -0400
commit627c2aa72f61a888866840810a7d31cb0648437b (patch)
tree6901ba42fbefd78526a3a699a4b287632f30bbad /src/fields/List.ts
parent2fc88a931cb2fc3408297b000208990633445585 (diff)
fixed proxyfields to use cache if it's available which saves orders of magnitude opening up Files list. Fixed copying docs to appear in Files list. fixed undo for change perspective and header color
Diffstat (limited to 'src/fields/List.ts')
-rw-r--r--src/fields/List.ts8
1 files changed, 7 insertions, 1 deletions
diff --git a/src/fields/List.ts b/src/fields/List.ts
index 5cc4ca543..edaa16003 100644
--- a/src/fields/List.ts
+++ b/src/fields/List.ts
@@ -278,7 +278,13 @@ class ListImpl<T extends Field> extends ObjectField {
const batchPromise = DocServer.GetRefFields(promised.map(p => p.promisedFieldId));
// as soon as we get the fields from the server, set all the list values in one
// action to generate one React dom update.
- batchPromise.then(pfields => promised.forEach(p => p.field.setValue(pfields[p.promisedFieldId])));
+ batchPromise.then(
+ action(pfields => {
+ for (let i = 0; i < promised.length; i++) {
+ promised[i].field.setValue(pfields[promised[i].promisedFieldId]);
+ }
+ })
+ );
// we also have to mark all lists items with this promise so that any calls to them
// will await the batch request and return the requested field value.
// This assumes the handler for 'promise' in the call above being invoked before the