From 26d7e045c5b0a9a29612e68d976e35c0e7e23d00 Mon Sep 17 00:00:00 2001 From: Nathan-SR <144961007+Nathan-SR@users.noreply.github.com> Date: Thu, 21 Mar 2024 13:37:17 -0400 Subject: Update CollectionSchemaView.tsx push --- .../views/collections/collectionSchema/CollectionSchemaView.tsx | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) (limited to 'src') 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; }; -- cgit v1.2.3-70-g09d2