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

Nothing is drawn on Android #76

Closed WeWishYouHappiness closed 4 years ago

WeWishYouHappiness commented 5 years ago

Nothing is drawn when I use TagInput. My code:

  export class TagsInput extends Component {

    constructor(props) {
      super(props);
      this.state = {
        text: "tags",
        tags: ["tags_1", "tags_2", "tags_3"],
        tag: ""
      }
    }

    render() {
      return (
        <TagInput
          value={this.state.tags}
          onChange={(tags) => this.setState({ tags })}
          labelExtractor={(tag) => tag}
          text={this.state.text}
          onChangeText={(text) => this.setState({ text })}
        />
      );
    }

  }
}

Are there any design requirements for TagInput? What are the requirement for the styles?

mohanprasathsj commented 5 years ago

Same issue here aswell. Nothing getting displayed in Android.

Ashoat commented 4 years ago
  1. Why are you using different state variables for the text and onChangeText properties?
  2. onChangeText should have the capacity to append values to the tags state variable
  3. If after addressing these issues you are still having problems, you’ll need to provide an MCVE that reproduces what you're seeing, in the form of an Expo Snack or a react-native init'd repo hosted on GitHub
WeWishYouHappiness commented 4 years ago

Everything works correctly.