baseweb icon indicating copy to clipboard operation
baseweb copied to clipboard

Wrong target property used in docs examples

Open RobIsHere opened this issue 3 years ago • 1 comments

Current Behavior

e.g. but also others https://baseweb.design/components/checkbox/ are using e.target... instead of e.currentTarget...

Please note the difference of e.target vs. e.currentTarget documented e.g. here: https://developer.mozilla.org/en-US/docs/Web/API/Event/currentTarget

Errors like these can happen: https://github.com/facebook/react/issues/4745

Expected Behavior

encourage use of the right event target

If you need more information, there are huge issues at github at react. Typescript is reporting an error if you accidentally use target instead of currentTarget. Without typescript you won't even notice your error.

  • [x ] I have searched the issues of this repository and believe that this is not a duplicate.

RobIsHere avatar May 03 '21 13:05 RobIsHere

Can you please share an error you're finding?

chasestarr avatar May 14 '21 17:05 chasestarr