esbenp / react-native-clean-form

Easy react-native forms using bootstrap-like syntax with redux-form+immutablejs integration. Styled using styled-components
http://esbenp.github.io/2017/01/06/react-native-redux-form-immutable-styled-components/
MIT License
478 stars 83 forks source link

When including a <Select /> element I get TypeError: undefined is not an object (evaluating 'theme.BaseInput') error #84

Open woutersmet opened 6 years ago

woutersmet commented 6 years ago

(note that I installed straight from github using npm install git+https://github.com/esbenp/react-native-clean-form/ to avoid the 'propStyles/PopStyles' error, not from npm. Also, I get this warning when doing npm install which might be relevant? npm WARN styled-components@3.2.6 requires a peer of react@>= 0.14.0 < 17.0.0-0 but none is installed. You must install peer dependencies yourself.)

More specifically it says the error takes place in Select (at index.js:91), so this line:

color: value ? theme.Input.color : theme.BaseInput.placeholderColor,

Here is my relevant code:

imports:

import {
  ActionsContainer,
  Button,
  FieldsContainer,
  Fieldset,
  Form,
  FormGroup,
  Input,
  Select,
  Label,
  Switch
} from 'react-native-clean-form'

and in my form component:

<Select
                              name="waarde"
                              label="Waarde"    
                              options={amountOptions}
                              placeholder="10 €"
                              />

So something seems to be going wrong