ismanf / react-native-checkbox-heaven Goto Github PK
View Code? Open in Web Editor NEWCheckbox component for ReactNative
License: MIT License
Checkbox component for ReactNative
License: MIT License
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
Add a property to CheckBox component that lets the developer increase the range around the checkbox that will recognised as a touch.
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.
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
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
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?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.