1
How do I leave an element focused by clicking on it?
example
At the moment I am making a filter page that has some buttons, but these buttons only work if I double click. (The onClick function inside them gets an Handle, which arrow the useState to true and runs a const to sort the contacts and handle the created filters). It works normally, but I need to double-click.
I believe that the first click is Focus and the second yes is setting and running.
I would like to know how I can do this. I put something inside Handle? I create a function apart and put it inside an onFocus?
Already penou in using the event
dbclick
? In JSX, the property is calledonDoubleClick
.– Luiz Felipe