Yesterday, for the first time, I started trying to use Vazco “Uniforms” in my Meteor Mantra Kickstarter, but I hit a hard to solve puzzle. :
<section class="field form-group">
<label for="uniforms-0000-0002" class="control-label">
Content
</label>
<textarea class="form-control" id="uniforms-0000-0002" name="content" placeholder="">
</textarea>
</section>
That field, like all the others in the form, is not write-able.
Can you spot some mistake I might be making that blocks me from being able to write to the fields in the form?
The JSX for it looks like this:
<BaseForm disabled={false} placeholder={false} schema={this.bridge} >
<div className="row-fluid">
<div className="col-md-4">
<NumField grid={6} name="pages" label="# Pages" value="0"/>
<TextField name="title" label="Title" />
</div>
<div className="col-md-8">
<LongTextField name="content" label="Content"
disabled={false} placeholder={false} />
</div>
</div>
<ErrorsField />
</BaseForm>
I set up the bridge definitions like this :
:
:
this.schemaType = API_AST.getType('Book');
this.schemaValidator = model => {
const details = [];
};
this.schemaData = {
};
console.log("Book schema : ", this.schemaType);
console.log("Schema validator : ", this.schemaValidator);
console.log("Schema data : ", this.schemaData);
this.bridge = new GraphQLBridge(
this.schemaType
, this.schemaValidator
, this.schemaData
);
console.log("The bridge : ", this.bridge);
}
The browser console shows me :
Book schema : GraphQLObjectType
_fields: Object
_id: Object
author: Object
content: Object
pages: Object
title: Object
__proto__: Object
_interfaces: Array[0]
_typeConfig: Object,
description: ""
isTypeOf: undefined,
name: "Book",
__proto__: Object
… then …
Schema validator : function (model) { // 39
var details = [];
… then …
Schema data : Object
__proto__: Object
… then …
The bridge : GraphQLBridge
extras: Object
schema: GraphQLObjectType
_fields: Object
_id: Object
author: Object
content: Object
pages: Object
title: Object
__proto__: Object
_interfaces: Array[0]
_typeConfig: Object
description: ""
isTypeOf: undefined
name: "Book"
__proto__: Onject
validator: (model)
__proto__: Bridge
Please let me know if the listings here are insufficient.