luqin / react-icheck

:radio_button: iCheck components built with React. Highly customizable checkbox, radio buttons and radio group.
https://luqin.github.io/react-icheck
177 stars 40 forks source link

Warning: Received `false` for non-boolean attribute `cursor`. If this is expected, cast the value to a string. #43

Open Archakov06 opened 6 years ago

Archakov06 commented 6 years ago

Warning: Received false for non-boolean attribute cursor. If this is expected, cast the value to a string. in input (created by EnhancedSwitch) in div (created by EnhancedSwitch) in label (created by EnhancedSwitch) in EnhancedSwitch (created by Checkbox) in Checkbox (at App.js:132) in div (at App.js:126) in div (at App.js:125) in div (at App.js:87) in div (at App.js:86) in div (at App.js:85) in div (at App.js:84) in div (at App.js:61) in div (at App.js:59) in App (created by Connect(App)) in Connect(App) (created by Route) in Route (at index.js:17) in div (at index.js:16) in Router (created by ConnectedRouter) in ConnectedRouter (at index.js:15) in Provider (at index.js:14)

<Checkbox
                        checkboxClass="icheckbox_square-blue"
                        label="С фотографией"
                      />
                      <Checkbox
                        checkboxClass="icheckbox_square-blue"
                        label="Бесплатно"
                      />
ghost commented 6 years ago

is there any work around for this problem?

matyashovandrey commented 6 years ago

No one to correct an error?

matyashovandrey commented 6 years ago

have any ideas how to fix this?

DiegoNovati commented 6 years ago

I have temporary fixed it by opening the 'EnhancedSwitch' under node_modules and commenting the lines where the 'cursor' property is used. This of course is only a temporary solution.

danbopes commented 6 years ago

Can we please get this fixed?

xilanhthanki commented 6 years ago

Same issue here. Someone have any suggestions?

alfeltrin commented 6 years ago

As suggested by @DiegoNovati open the file "node_modules / react-icheck / lib / EnhancedSwitch.js" and comment the following lines: 126: cursor: _propTypes2['default'].bool, 183: cursor: false,

vndevil commented 6 years ago

@alfeltrin you're right, but this is only a temporary solution.

wickedev commented 6 years ago

This project is not maintain anymore?

johanleroch commented 6 years ago

Seriously... It seems to be no longer maintained. I fork it and I fix it, don't have the time to wait

iqqmuT commented 6 years ago

@johanleroch Are you planning to publish your fixed fork with different npm name?

johanleroch commented 6 years ago

Hi @iqqmuT , sorry, I do not plan to do it, I have to much to do on my other projects, but you can fork my fix and deploy with different name on npm if you want.

berzniz commented 5 years ago

A workaround is to do this:

import EnhancedSwitch from 'react-icheck/lib/EnhancedSwitch'
import { Checkbox } from 'react-icheck'

// Workaround for https://github.com/luqin/react-icheck/issues/43
EnhancedSwitch.propTypes = {
  ...EnhancedSwitch.propTypes,
  cursor: PropTypes.string
}

const Component = () => <Checkbox cursor="pointer" ...rest_of_props... />
victorpopkov commented 5 years ago

If someone is still interested, I have recently made a complete rework of this project to continue the development: https://github.com/victorpopkov/react-ui-icheck

npm install react-ui-icheck --save

I can't guarantee that it has the full backwards compatibility, but in most cases, it should be compatible.