JakeSidSmith / react-fastclick

Fast Touch Events for React
https://www.npmjs.com/package/react-fastclick
MIT License
487 stars 41 forks source link

Checkbox label is not working, when i use react-fastclick? #62

Open Aravindraj92 opened 5 years ago

Aravindraj92 commented 5 years ago

here my code==>

                           <input 
                            type="checkbox" 
                            className="no-fastclick checkbox" id="accept"
                            name="agree"
                            checked={this.state.checkBox}
                            onChange={this.handleCheck}/>
                            <label htmlFor="accept">By proceeding you agree to Terms of Use and Privacy Policy.</label>
JakeSidSmith commented 5 years ago

Hello. Which version of react-fastclick are you using?

Aravindraj92 commented 5 years ago

Sorry for the late replay and I have using react-fastclick": "^3.0.2

JakeSidSmith commented 5 years ago

Hey, @Aravindraj92. This seems to be something I never implemented. I'd be happy to accept a pull request to handle this. Inside this if block you'd simply need to check if the element type was a checkbox, and then set forTarget.checked = !forTarget.checked;.

If you'd like to look into this, it may be worth doing the same for radio buttons also. 😊

Aravindraj92 commented 5 years ago

Working! when modifying index.js in node module, but I couldn't modify there because I have run "npm install" in the server for every push request.

Lizitao610 commented 4 years ago

Hi, this problem has not resolve yet ?

JakeSidSmith commented 4 years ago

It is not, though I'm happy to accept pull requests. 🙂