diff options
| author | bob <bcz@cs.brown.edu> | 2019-05-21 12:35:38 -0400 |
|---|---|---|
| committer | bob <bcz@cs.brown.edu> | 2019-05-21 12:35:38 -0400 |
| commit | a8717e39df75cbd1fd13435ee9028f230a833399 (patch) | |
| tree | a17bf828e79e0f20ceb55546915d0bf4be41928e /src/client/views/collections/CollectionSchemaView.tsx | |
| parent | 7bafa21e8c37826686a012151674b71631fa9c8b (diff) | |
| parent | cfb7fdb1a7b2db263502677e57ee882a6fe23f13 (diff) | |
Merge branch 'master' of https://github.com/browngraphicslab/Dash-Web
Diffstat (limited to 'src/client/views/collections/CollectionSchemaView.tsx')
| -rw-r--r-- | src/client/views/collections/CollectionSchemaView.tsx | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/src/client/views/collections/CollectionSchemaView.tsx b/src/client/views/collections/CollectionSchemaView.tsx index c42a0332d..bfd70ceae 100644 --- a/src/client/views/collections/CollectionSchemaView.tsx +++ b/src/client/views/collections/CollectionSchemaView.tsx @@ -124,22 +124,20 @@ export class CollectionSchemaView extends CollectionSubView(doc => doc) { height={Number(MAX_ROW_HEIGHT)} GetValue={() => { let field = props.Document[props.fieldKey]; - if (field) { - //TODO Types - // return field.ToScriptString(); - return String(field); + if (Field.IsField(field)) { + return Field.toScriptString(field); } return ""; }} SetValue={(value: string) => { - let script = CompileScript(value, { addReturn: true, params: { this: Document.name } }); + let script = CompileScript(value, { addReturn: true, params: { this: Doc.name } }); if (!script.compiled) { return false; } return applyToDoc(props.Document, script.run); }} OnFillDown={async (value: string) => { - let script = CompileScript(value, { addReturn: true, params: { this: Document.name } }); + let script = CompileScript(value, { addReturn: true, params: { this: Doc.name } }); if (!script.compiled) { return; } |
