Tcomb-form-native: Can't output a textarea

Created on 7 May 2018  路  2Comments  路  Source: gcanti/tcomb-form-native

Sorry to crosspost, but I am stumped. I also added this issue in tcomb-form: https://github.com/gcanti/tcomb-form/issues/414

Version

Tell us which versions you are using:

"tcomb": "^3.2.25",
"tcomb-form-native": "^0.6.11"
"react": "^16.3.0",

Expected behaviour

Textarea in form output.

Actual behaviour

Textbox in form output.

Steps to reproduce

When I specify a textarea, I still get a textbox. What might I be doing wrong?

var props = {
      notes: t.maybe(t.String)
}
fields: {
        notes: {
          type: 'textarea',
          autoCapitalize: 'none',
          autoCorrect: false
        }
}

Thanks.

Most helpful comment

You need to specify some options to make it multiline and change its appearance:

        comment: {
          multiline: true,
          stylesheet: {
            ...Form.stylesheet,
            textbox: {
              ...Form.stylesheet.textbox,
              normal: {
                ...Form.stylesheet.textbox.normal,
                height: 200,
                textAlignVertical: 'top',
              },
              error: {
                ...Form.stylesheet.textbox.error,
                height: 200,
              },
            },
          },
        },

All 2 comments

You need to specify some options to make it multiline and change its appearance:

        comment: {
          multiline: true,
          stylesheet: {
            ...Form.stylesheet,
            textbox: {
              ...Form.stylesheet.textbox,
              normal: {
                ...Form.stylesheet.textbox.normal,
                height: 200,
                textAlignVertical: 'top',
              },
              error: {
                ...Form.stylesheet.textbox.error,
                height: 200,
              },
            },
          },
        },

Thank you!

Was this page helpful?
0 / 5 - 0 ratings

Related issues

muthuraman007 picture muthuraman007  路  4Comments

alexicum picture alexicum  路  6Comments

newbreedofgeek picture newbreedofgeek  路  6Comments

albertogugliotta picture albertogugliotta  路  3Comments

pgmemk picture pgmemk  路  4Comments