jwohlfert23 / react-native-tag-input

A simple React Native component that creates an input for tags, emails, etc.
MIT License
231 stars 104 forks source link

How to modify height? #71

Closed isaaclem closed 5 years ago

isaaclem commented 5 years ago

screen shot 2018-11-01 at 4 35 55 pm

As shown in above image, the tag created seems to be having height issue? I tried to change the props of maxHeight but doesnt seems to help?

<TagInput
                value={this.state.tags}
                onChange={this.onChangeTags}
                labelExtractor={this.labelExtractor}
                text={this.state.text}
                onChangeText={this.onChangeText}
                tagColor="blue"
                tagTextColor="white"
                inputProps={inputProps}
                maxHeight={300}
              />

const inputProps = {
  keyboardType: 'default',
  placeholder: 'email',
  autoFocus: true,
  style: {
    fontSize: 14,
    marginVertical: Platform.OS === 'ios' ? 10 : -2,
  },
};
isaaclem commented 5 years ago

I've found the culprit, it's the 24 of height being hardcoded. It will be good if we can let the user to define the desired height via props?

  tag: {
    justifyContent: 'center',
    marginTop: 6,
    marginRight: 3,
    padding: 8,
    height: 24,
    borderRadius: 2,
  },
Ashoat commented 5 years ago

tagContainerStyle