aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNathan-SR <144961007+Nathan-SR@users.noreply.github.com>2024-03-21 13:37:17 -0400
committerNathan-SR <144961007+Nathan-SR@users.noreply.github.com>2024-03-21 13:37:17 -0400
commit26d7e045c5b0a9a29612e68d976e35c0e7e23d00 (patch)
treecc1a8d9754e25a380555c13d1b2f6628b2b1cfb7
parentefcacfa867ac7ac39d97ed2fe33c1311b912ca0f (diff)
Update CollectionSchemaView.tsx
push
-rw-r--r--src/client/views/collections/collectionSchema/CollectionSchemaView.tsx9
1 files changed, 7 insertions, 2 deletions
diff --git a/src/client/views/collections/collectionSchema/CollectionSchemaView.tsx b/src/client/views/collections/collectionSchema/CollectionSchemaView.tsx
index b2942cc47..71938d13e 100644
--- a/src/client/views/collections/collectionSchema/CollectionSchemaView.tsx
+++ b/src/client/views/collections/collectionSchema/CollectionSchemaView.tsx
@@ -599,14 +599,19 @@ export class CollectionSchemaView extends CollectionSubView() {
};
setColumnValues = (key: string, value: string) => {
+ const selectedDocs: Doc[] = new Array;
this.childDocs.forEach(doc => {
let docIsSelected = this._selectedCells && !(this._selectedCells?.filter(d => d === doc).length === 0);
if (docIsSelected){
- KeyValueBox.SetField(doc, key, value)
+ selectedDocs.push(doc);
}
}
);
- //this.childDocs.forEach(doc => KeyValueBox.SetField(doc, key, value));
+ if (selectedDocs.length === 1){
+ this.childDocs.forEach(doc => KeyValueBox.SetField(doc, key, value));
+ } else {
+ selectedDocs.forEach(doc => KeyValueBox.SetField(doc, key, value));
+ }
return true;
};