My question is that you need to disable a div in React, but the disabled property doesn't work for it.
Does anyone know what other property could be used? Or if there is another way to disable the div
My question is that you need to disable a div in React, but the disabled property doesn't work for it.
Does anyone know what other property could be used? Or if there is another way to disable the div
Try the following:
In your component assign the property
disabled
to the elementdiv
and add the following style to the div element:
**** This does the magic *****
Here I leave the link as evidence and the code
https://react-playground-practice-n3uqaw.stackblitz.io
https://stackblitz.com/edit/react-playground-practice-n3uqaw?file=index.js