Closed volkanunsal closed 8 years ago
How can I render the default implementation of the Select field in tcomb-form when I am implementing a custom template for a field?
My implementation only needs to wrap the form field, and I don't want to reinvent the wheel to do this:
var myLayout = function(locals){ var defaultSelect = ??? return ( <div className='panel panel-filter'> <div className='panel-heading'> <b className='panel-title'>{locals.label}</b> </div> <ul className='list-group'> {defaultSelect} </ul> </div> ); }; export let options = { fields: { status: { label: 'Status', template: myLayout } }
I have tried the following solution, but it does not work:
import { compile } from 'uvdom/react'; compile(t.form.Form.templates.select(locals))
Edit:
Btw, these are the versions I'm using:
"tcomb": "2.2.0", "tcomb-form": "0.6.3", "uvdom": "0.1.2"
Whoops. It does work. I think my versions were out of sync.
How can I render the default implementation of the Select field in tcomb-form when I am implementing a custom template for a field?
My implementation only needs to wrap the form field, and I don't want to reinvent the wheel to do this:
I have tried the following solution, but it does not work:
Edit:
Btw, these are the versions I'm using: