skip to Main Content

this is my code

<View>
                <TextField
                  ref={this.layananMenu}
                  editable={false}
                  label={
                    'Produk investasi apa saja yang pernah kamu miliki?'
                  }
                  
                  value={this.state.product?.menuName}
                  renderRightAccessory={() =>
                    this.state.loadingUsaha ? ( //ganti
                      <ActivityIndicator animating={true} />
                    ) : (
                      <Icon name={'keyboard-arrow-down'} size={24} />
                    )
                  }
                />
              </View>

and the result is :
my code result

my expectation is :
my expectation from UI design

2

Answers


  1. Welcome to SOFlow.It can be done using multiline={true} or giving padding in the text field,<TextField style={...} Hope it would work.

    <TextField 
          ref={this.layananMenu}
          editable={false}
          label={'Produk investasi apa saja yang pernah kamu miliki?'}
          multiline = {true}
        />
    
    Login or Signup to reply.
  2. Add multiline prop in TextField in this way:

    <TextField 
     ref={this.layananMenu}
     editable={false}
     label={'Produk investasi apa saja yang pernah kamu miliki?'}
     multiline={true}
    />
    
    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search