aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/client/views/nodes/FieldView.tsx19
-rw-r--r--src/fields/Document.ts1
2 files changed, 15 insertions, 5 deletions
diff --git a/src/client/views/nodes/FieldView.tsx b/src/client/views/nodes/FieldView.tsx
index 49f4cefce..e84c5f933 100644
--- a/src/client/views/nodes/FieldView.tsx
+++ b/src/client/views/nodes/FieldView.tsx
@@ -16,6 +16,7 @@ import { WebBox } from "./WebBox";
import { VideoBox } from "./VideoBox";
import { AudioBox } from "./AudioBox";
import { AudioField } from "../../../fields/AudioField";
+import { ListField } from "../../../fields/ListField";
//
@@ -60,12 +61,20 @@ export class FieldView extends React.Component<FieldViewProps> {
}
else if (field instanceof WebField) {
return <WebBox {...this.props} />
- }
- else if (field instanceof VideoField){
- return <VideoBox {...this.props}/>
}
- else if (field instanceof AudioField){
- return <AudioBox {...this.props}/>
+ else if (field instanceof VideoField) {
+ return <VideoBox {...this.props} />
+ }
+ else if (field instanceof AudioField) {
+ return <AudioBox {...this.props} />
+ } else if (field instanceof Document) {
+ return <div>{field.Title}</div>
+ } else if (field instanceof ListField) {
+ return (<div>
+ {(field as ListField<Field>).Data.map(f => {
+ return f instanceof Document ? f.Title : f.GetValue().toString();
+ }).join(", ")}
+ </div>)
}
// bcz: this belongs here, but it doesn't render well so taking it out for now
// else if (field instanceof HtmlField) {
diff --git a/src/fields/Document.ts b/src/fields/Document.ts
index 5f0889786..be0137128 100644
--- a/src/fields/Document.ts
+++ b/src/fields/Document.ts
@@ -310,6 +310,7 @@ export class Document extends Field {
throw new Error("Method not implemented.");
}
GetValue() {
+ return this.Title;
var title = (this._proxies.has(KeyStore.Title.Id) ? "???" : this.Title) + "(" + this.Id + ")";
return title;
//throw new Error("Method not implemented.");