tcomb-form-native
tcomb-form-native copied to clipboard
numberOfLines is not working
Version
- tcomb-form-native v0.6.20
- react-native v0.61.1
That is my options. I set multiline: true
and numberOfLines
is not working. I am expecting to show multiline input.
options = {
i18n: {
optional: '',
required: '*'
},
stylesheet: stylesheet,
fields: {
comment: {
label: 'Comment',
error: 'Check in',
placeholder: 'i.e comment,
multiline: true,
numberOfLines: 4,
},
}
};
Actual behaviour
It is showing single line input.
As a workaround, you can adjust the style to get it to work. For example I have a multiline Notes field working in v0.6.20 with the following options:
Notes: {
multiline: true,
returnKeyType: 'done',
blurOnSubmit: true,
stylesheet: {
...Form.stylesheet,
textbox: {
...Form.stylesheet.textbox,
normal: {
...Form.stylesheet.textbox.normal,
height: 60,
textAlignVertical: 'top',
},
error: {
...Form.stylesheet.textbox.error,
height: 60,
},
},
},
}
The key pieces there being multiline: true
(which you already have) and the added style attributes of height: 60
and textAlignVertical: 'top'
.