-
Notifications
You must be signed in to change notification settings - Fork 3
Open
Description
I do not know how to create a pull request, so adding this to issues:
It would be nice to add a "templates" property to allow the user to override the global templates for some types.
Code change in FormSchema.js
var defaultTemplates = require('tcomb-form-native/lib/templates/bootstrap'); // -> NEW
type Props = {
data: Object,
schema: Object,
stylesheet?: Object,
templates?: Object // -> NEW
};
options: {
...getFormOptions(props.schema),
stylesheet: props.stylesheet,
templates: Object.assign(defaultTemplates, props.templates) // -> NEW
}
This is just an example how to implement this, maybe there is an even better solution.
const templates = {"select":select};
...
Thanks in advance
nafisholeh
Metadata
Metadata
Assignees
Labels
No labels