An onClickOutside wrapper for React components
MIT License
Bot releases are hidden (Show)
Fixed removing event listeners in some browsers.
Published by Andarist almost 7 years ago
8% gain in lib's size
Published by Andarist almost 7 years ago
Published by Andarist almost 7 years ago
componentDidMount
to the constructor, otherwise if enableOnClickOutside
got called before componentDidMount
(i.e. in WrappedComponent
's componentDidMount) the handler got registered under undefined "uid"Published by Andarist almost 7 years ago
Published by Andarist about 7 years ago
Published by Andarist about 7 years ago
IGNORE_CLASS_NAME
so it may be used as constant instead of hard-coding it in the projectspassive
listeners under the hoodPublished by Andarist about 7 years ago
Published by Andarist about 7 years ago
null
, handling attachment/deattachment of internal DOM listeners automatically in such casespassive
setting for the touch events (based on the preventDefault
prop)