Unable to pass parameter
OrganicOat opened this issue · comments
Cheah commented
The QRCode is look like unable to pass it value to function, do youguys has any Idea about this?
Paul O’Shannessy commented
Do you have an example?
Cheah commented
The (e) is undefined when try to pass it into my function, that value work only when scan.
<QRCode size={113} value="hihi" onClick={(value, e) => ZoomInQRCode(e)} />
function ZoomInQRCode(e) {
console.log(e)
}
Paul O’Shannessy commented
e
is going to be undefined. We don't expose an onClick
so you're just getting the raw onClick
from the DOM, and the first argument is the event.