diff options
author | Nathan-SR <144961007+Nathan-SR@users.noreply.github.com> | 2024-03-21 13:37:17 -0400 |
---|---|---|
committer | Nathan-SR <144961007+Nathan-SR@users.noreply.github.com> | 2024-03-21 13:37:17 -0400 |
commit | 26d7e045c5b0a9a29612e68d976e35c0e7e23d00 (patch) | |
tree | cc1a8d9754e25a380555c13d1b2f6628b2b1cfb7 /src | |
parent | efcacfa867ac7ac39d97ed2fe33c1311b912ca0f (diff) |
Update CollectionSchemaView.tsx
push
Diffstat (limited to 'src')
-rw-r--r-- | src/client/views/collections/collectionSchema/CollectionSchemaView.tsx | 9 |
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; }; |