atasmohammadi / react-native-checkbox-group

React native checkbox group component
10 stars 17 forks source link

Undefined is not an object(evaluating '_react2.PropTypes.oneOf') #1

Open clone-999 opened 6 years ago

clone-999 commented 6 years ago

I'm getting this error; "Undefined is not an object(evaluating '_react2.PropTypes.oneOf')" when ever I do the following; import CheckboxGroup from 'react-native-checkbox-group'

Please how do I fix this.

Thanks

adwait-paraskar commented 6 years ago

I've created a PR for this. If its not accepted you can use my fork.

priyankagupta23pg commented 6 years ago

I am also facing same issue "Undefined is not an object(evaluating '_react2.PropTypes.oneOf')"

okechukwu0127 commented 5 years ago

I am also facing the same problem...

Has anyone able to resolve this issue

Find code bellow

<CheckboxGroup callback={(selected) => { console.log(selected) }} //iconColor={"#00a2dd"} //iconSize={30} //checkedIcon="ios-checkbox-outline" //uncheckedIcon="ios-square-outline" checkboxes={

        this.formatJSON(this.data.Question_Options.Options)

    }
    labelStyle={{
        color: '#333'
    }}
    rowStyle={{
        flexDirection: 'row'
    }}
    rowDirection={"column"}
/>
saeidparvizi commented 5 years ago

I am also facing same issue "Undefined is not an object(evaluating '_react2.PropTypes.oneOf')" I fixed this temporarily by manually changing (in MyProject/node_modules/react-native-checkbox-group/checkboxGroup.js): import React, { Component, PropTypes } from "react"; to import React, { Component } from "react"; import PropTypes from "prop-types"; Then changing: import Icon from 'react-native-vector-icons/Ionicons'; to import Icon from 'react-native-vector-icons/dist/Ionicons';.

avolcoff commented 5 years ago

I've created a PR for this. If its not accepted you can use my fork.

when is the fix going to be merged?

adwait-paraskar commented 5 years ago

I've created a PR for this. If its not accepted you can use my fork.

when is the fix going to be merged?

No idea. This is not my repo.