Code Monkey home page Code Monkey logo

react-native-checkbox-heaven's People

Contributors

ismanf avatar maksimdegtyarev avatar pitchourou avatar udarts avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

react-native-checkbox-heaven's Issues

Error: defaultIcon is read-only

Hi there! I'm finding react-native-checkbox-heaven is causing my test builds to error out because of a line in CheckBox.js where a constant, defaultIcon, is reassigned. This doesn't seem to affect the app as it runs in the emulator, but it does make it impossible to run my tests, either locally or in CI.

Locally, I was able to change this by manually editing Checkbox.js to change

const defaultIcon = iconDb[8]

to

var defaultIcon = iconDb[8]

However, this isn't an option in my CI environment.

This is the error produced:

$ jest --coverage
 FAIL  ./App.test.js
  โ— Test suite failed to run
    /home/travis/build/danascheider/inview-login-service/node_modules/react-native-checkbox-heaven/src/CheckBox.js: "defaultIcon" is read-only
        32 | 
        33 |         if (index !== -1) {
      > 34 |             defaultIcon = iconDb[index]
           |             ^
        35 |         }
        36 | 
        37 |         const { component: Icon, checkedIconName, uncheckedIconName } = defaultIcon

[Suggestion] Add property hitSlop

Add a property to CheckBox component that lets the developer increase the range around the checkbox that will recognised as a touch.

Input radio

Is it possible use as input radio, like:

<CheckBox label="Male" onChange={this.handleOnChange.bind(this, 0)} checked={this.state.value == 0} iconName="iosCircleFill" />
<CheckBox label="Female" onChange={this.handleOnChange.bind(this, 1)} checked={this.state.value == 1} iconName="iosCircleFill" />

Right now, both fields it's been checked.

undefined is not an object (evaluating 'PropTypes.func')

hi, i just installed your library, restarted the packager and attempted to use the checkbox in my view. instead, i am greeted by this error from the development server. i am using latest version of react native and latest version of react 16

Version issues

Hi, this doesn't work when following the installation.

The package downloaded from npm contains an old version of CheckBox.js without the newest PR to fix proptypes.

Workaround:

npm install git+https://github.com/ismayilmalik/react-native-checkbox-heaven.git --save

Cannot prevent checkbox from being checked

There is no disabled or prevent interaction with the checkbox and
onChange you can't return false to prevent the box from being checked

Still checked={this.state} has no effect when doing setState

was it suppose to be fixed with commit#3731f5e?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.