aboutsummaryrefslogtreecommitdiff
path: root/src/new_fields/documentSchemas.ts
diff options
context:
space:
mode:
authorBob Zeleznik <zzzman@gmail.com>2020-01-21 00:11:41 -0500
committerBob Zeleznik <zzzman@gmail.com>2020-01-21 00:11:41 -0500
commit69e068d77731c25d9f1dbafb8c7d279e343a4e55 (patch)
tree4df35c6233f9440d676e0b7e4758f113e4b10cfc /src/new_fields/documentSchemas.ts
parentd528b9d19a685d8447a9d54715dc94cd66034852 (diff)
fixed up creating template fields in stacking views (+ after the template is made)
Diffstat (limited to 'src/new_fields/documentSchemas.ts')
-rw-r--r--src/new_fields/documentSchemas.ts7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/new_fields/documentSchemas.ts b/src/new_fields/documentSchemas.ts
index d5c34e128..3683e5820 100644
--- a/src/new_fields/documentSchemas.ts
+++ b/src/new_fields/documentSchemas.ts
@@ -68,6 +68,13 @@ export const positionSchema = createSchema({
z: "number",
});
+export const collectionSchema = createSchema({
+ childLayout: Doc, // layout template for children of a collecion
+ childDetailed: Doc, // layout template to apply to a child when its clicked on in a collection and opened (requires onChildClick or other script to use this field)
+ onChildClick: ScriptField, // script to run for each child when its clicked
+ onCheckedClick: ScriptField, // script to run when a checkbox is clicked next to a child in a tree view
+});
+
export type Document = makeInterface<[typeof documentSchema]>;
export const Document = makeInterface(documentSchema);