-
Notifications
You must be signed in to change notification settings - Fork 457
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
How to change the height of a multiline text input? #52
Comments
No, you can override the stylesheet locally: https://github.com/gcanti/tcomb-form-native#stylesheets and in
(see the file https://github.com/gcanti/tcomb-form-native/blob/master/lib/stylesheets/bootstrap.js#L62 for the complete code) Example: var Foo = t.struct({
description: t.Str
});
var options = {
fields: {
description: {
multiline: true,
stylesheet: Object.assign({}, t.form.Form.stylesheet.textbox, {
...my overrides here...
})
}
}
}; |
I was doing exactly that but using underscore's options: {
fields: {
description: {
multiline: true,
stylesheet: {
...Form.stylesheet,
textbox: {
...Form.stylesheet.textbox,
normal: {
...Form.stylesheet.textbox.normal,
height: 100
},
error: {
...Form.stylesheet.textbox.error,
height: 100
}
}
}
},
}
} |
For future reference, here is how I solved this:
|
Hi, looks like all above are fixed height, I am trying to implement an auto-grow TextInput like the official docs: |
@weixingsun looks like we use https://github.com/gcanti/tcomb-form-native/blob/master/lib/templates/bootstrap/textbox.js#L64
we could add an |
Thanks for your quick answer, it will be really helpful. |
@weixingsun in general for this kind of things I'd prefer to provide low level APIs and let people implement its own customised solutions |
Ok, that is good enough, thanks for your help! |
@weixingsun you can track the new feature here #168 |
@gcanti thanks for your help, do you know if there is any method to show multiline textbox for default value? My detail content field show only one line, any idea? |
The solution worked in terms of designing but when I top on the field to write something, It takes the cursor to the middle of the box, unable to start writing from top left corner. |
I'm struggling to change the height of a multiline input inside a form. Do I have to define an entire stylesheet for that element just for changing one property?
The text was updated successfully, but these errors were encountered: