aboutsummaryrefslogtreecommitdiff
path: root/src/fields/SchemaHeaderField.ts
diff options
context:
space:
mode:
authorNaafiyan Ahmed <naafiyan@gmail.com>2022-03-17 12:17:27 -0400
committerGitHub <noreply@github.com>2022-03-17 12:17:27 -0400
commit5c874c6829d9957696dfe61014173b6800c864df (patch)
tree23b7206679d500fc039a4302255cf3d6e17b47d3 /src/fields/SchemaHeaderField.ts
parenta299d1766aa7f4bf3e6bbc3032a39b6b5ae28b4b (diff)
parent5a385e46937a2f79d557b4ee929e78ba78aca8bf (diff)
Merge pull request #55 from brown-dash/speedups2
Speedups2
Diffstat (limited to 'src/fields/SchemaHeaderField.ts')
-rw-r--r--src/fields/SchemaHeaderField.ts14
1 files changed, 7 insertions, 7 deletions
diff --git a/src/fields/SchemaHeaderField.ts b/src/fields/SchemaHeaderField.ts
index a53fa542e..3b02d0cfe 100644
--- a/src/fields/SchemaHeaderField.ts
+++ b/src/fields/SchemaHeaderField.ts
@@ -2,7 +2,7 @@ import { Deserializable } from "../client/util/SerializationHelper";
import { serializable, primitive } from "serializr";
import { ObjectField } from "./ObjectField";
import { Copy, ToScriptString, ToString, OnUpdate } from "./FieldSymbols";
-import { scriptingGlobal } from "../client/util/Scripting";
+import { scriptingGlobal } from "../client/util/ScriptingGlobals";
import { ColumnType } from "../client/views/collections/collectionSchema/CollectionSchemaView";
export const PastelSchemaPalette = new Map<string, string>([
@@ -82,32 +82,32 @@ export class SchemaHeaderField extends ObjectField {
setHeading(heading: string) {
this.heading = heading;
- this[OnUpdate]();
+ this[OnUpdate]?.();
}
setColor(color: string) {
this.color = color;
- this[OnUpdate]();
+ this[OnUpdate]?.();
}
setType(type: ColumnType) {
this.type = type;
- this[OnUpdate]();
+ this[OnUpdate]?.();
}
setWidth(width: number) {
this.width = width;
- this[OnUpdate]();
+ this[OnUpdate]?.();
}
setDesc(desc: boolean | undefined) {
this.desc = desc;
- this[OnUpdate]();
+ this[OnUpdate]?.();
}
setCollapsed(collapsed: boolean | undefined) {
this.collapsed = collapsed;
- this[OnUpdate]();
+ this[OnUpdate]?.();
}
[Copy]() {