gcanti / tcomb-form

Forms library for react
https://gcanti.github.io/tcomb-form
MIT License
1.16k stars 136 forks source link

set properties on textarea #193

Closed benmonro closed 9 years ago

benmonro commented 9 years ago

I have a field w/ a textarea and I'd like to set the cols/rows without having to define my own template just to do it. Is it possible to just set attributes on the element in the config options or elsewhere?

i.e.

var options = {
fields: {
    'purpose':{
        'type':'textarea',
        'attributes':{
              'cols':32, 'rows':8
        }
    }
}
};
benmonro commented 9 years ago

nevermind, looks like I was looking at an old version of the docs here: https://gcanti.github.io/tcomb-form/guide/index.html

the guide.md shows the 'attrs' property which is exactly what I want.