Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Labels are not displayed on iOS #72

Open
ghost opened this issue May 2, 2020 · 0 comments
Open

Labels are not displayed on iOS #72

ghost opened this issue May 2, 2020 · 0 comments
Labels

Comments

@ghost
Copy link

ghost commented May 2, 2020

Hi !

Labels are not displayed on iOS.
On Android, it works.
image : https://ibb.co/pbyDBrW

` import React from 'react';
import { View } from 'react-native';
import Input from 'react-native-select-input-ios';

import FontText from '../../FontText';
import style from './style';

class SelectInput extends React.Component {

constructor(props) {
super(props);

this.state = {
  valueInput: this.props.value
};

}

onValueChange = (value) => {

for(const element of this.props.options) {
  if (element.value === value) {
    this.setState({
      valueInput: element.label
    });
    break;
  }
}

this.props.input.onChange(value);

}

render() {
const { input } = this.props;

return (

  <View style={[style.view, this.props.containerStyle]}>

    <FontText 
      style={[style.text, this.props.textStyle]}
    >
        {this.props.label}
    </FontText>

    <Input

      style={[
        style.input, 
        this.props.inputStyle,
        this.props.meta.warning === undefined ? style.inputValid : style.inputInvalid
      ]}
      labelStyle={[
        style.labelStyle,
        this.props.labelStyle
      ]}

      onValueChange={this.onValueChange}
      onSubmitEditing={this.onValueChange}
      onBeginEditing={input.onFocus}
      onBlur={input.onBlur}

      mode={this.props.mode}
      value={this.state.valueInput}
      options={this.props.options}
    />

  </View>
);

}
}

export default SelectInput;
`
Is it normal ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant