aboutsummaryrefslogtreecommitdiff
path: root/src/client/views/collections/collectionSchema/CollectionSchemaView.tsx
diff options
context:
space:
mode:
authormehekj <mehek.jethani@gmail.com>2023-03-22 17:42:28 -0400
committermehekj <mehek.jethani@gmail.com>2023-03-22 17:42:28 -0400
commit3fed87fe05a70a5ef63ed7989c7a28faee68bf4b (patch)
treefe4cfa2919ef4b3aa26ad898023d85ada21f6bf2 /src/client/views/collections/collectionSchema/CollectionSchemaView.tsx
parent1be46d0193752c4158cf327b8d3f7421b2d1b60f (diff)
shift enter shortcut to fill column
Diffstat (limited to 'src/client/views/collections/collectionSchema/CollectionSchemaView.tsx')
-rw-r--r--src/client/views/collections/collectionSchema/CollectionSchemaView.tsx7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/client/views/collections/collectionSchema/CollectionSchemaView.tsx b/src/client/views/collections/collectionSchema/CollectionSchemaView.tsx
index 4498a2258..48db1467c 100644
--- a/src/client/views/collections/collectionSchema/CollectionSchemaView.tsx
+++ b/src/client/views/collections/collectionSchema/CollectionSchemaView.tsx
@@ -28,6 +28,7 @@ import { DocumentManager } from '../../../util/DocumentManager';
import { ScriptField } from '../../../../fields/ScriptField';
import { FontAwesomeIcon } from '@fortawesome/react-fontawesome';
import { IconButton } from 'browndash-components';
+import { KeyValueBox } from '../../nodes/KeyValueBox';
export enum ColumnType {
Number,
@@ -607,6 +608,12 @@ export class CollectionSchemaView extends CollectionSubView() {
this.closeColumnMenu();
};
+ setColumnValues = (key: string, value: string) => {
+ let success: boolean = true;
+ this.childDocs.forEach(doc => success && KeyValueBox.SetField(doc, key, value));
+ return success;
+ };
+
@action
openColumnMenu = (index: number, newCol: boolean) => {
this._makeNewColumn = false;