question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

I can't press more than 1 time

See original GitHub issue

friends, I have problems using the checkbox. I can only press it 1 time. When clicking on the checkbox (checked with a console.log) it only changes its value and returns the console log the first time it is pressed, since after that, the amounts that you press do absolutely nothing and do not change value.

This is my useState Hooks:

const [toggleCheckBox, setToggleCheckBox] = useState(false)

This is my CheckBox code:

 <CheckBox
        disabled={false}
        value={toggleCheckBox}
        onValueChange={(newValue) => setToggleCheckBox(newValue)}/>

I tried all the ways I found on the internet and with all of them it’s the same.

Issue Analytics

  • State:open
  • Created 3 years ago
  • Reactions:1
  • Comments:9

github_iconTop GitHub Comments

2reactions
balagurubarancommented, Mar 2, 2021

Am also facing the same problem in my android project. In iOS is working as expected.

The below piece of code, Am using to render the Check box.

  <CheckBox
                                style = {{marginLeft:0 , height:20}}
                                onFillColor = { Color_Constant.color.app_yellow }
                                onCheckColor = 'white'
                                onTintColor = { Color_Constant.color.app_yellow }
                                tintColor = { Color_Constant.color.app_yellow }
                                tintColors={{ true: Color_Constant.color.app_yellow, false: Color_Constant.color.app_yellow }}
                                disabled={false}
                                value={this.state.CheckBoxStatus}
                                onValueChange={(value) => {
                                 
                                }}
                            />

Found the solution https://www.youtube.com/watch?time_continue=9&v=N1I67FaluFE&feature=emb_logo

Read more comments on GitHub >

github_iconTop Results From Across the Web

How do I remove the limit on PC keyboard button presses?
The reason why many keyboard won't allow more than 2 keys at the same time (with a few notable exceptions like Ctrl +...
Read more >
Why Can't I Press 3 Keyboard Keys at A Time? (Explained)
You can use more than three keys simultaneously. Some can hit to the tune of 19 keys ago. This is referred to as...
Read more >
Why can't I press more than three buttons on my keyboard ...
If you want to be able to press any number of keys at once, you'll need a keyboard with n-key rollover (nkro), which...
Read more >
Can't press multiple keys at once for no reason? - Reddit
My first guess is that you're experiencing n-key rollover. This is a hardware issue resulting from how "cheap" keyboards are manufactured. More ...
Read more >
Keyboard doesn't let me press certain keys at the same time
Consider buying a better keyboard (cheap keyboards have fewer wires, more keys have to share the same wires and thus the keyboard gets...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found