Comments (5)
https://codesandbox.io/s/clickawaylistener-example-forked-uch2g?file=/src/index.js
Above you have an example when it's not working. I figured it out and it looks like it doesn't work if i have a MaterialUI <Menu/>
component with keepsMounted prop set to true.
Below you have the exact same code but with React version set to 16.14.0 and this one works.
https://codesandbox.io/s/clickawaylistener-example-forked-q7nz2?file=/src/index.js
from react-click-away-listener.
This has been fixed in the latest version (v2.0.1).
Thanks a lot for reporting and taking the time to create an example on CodeSandbox 🙏
from react-click-away-listener.
@zenstok Sorry about that. Can you provide the version of the Clickaway listener you are using?
from react-click-away-listener.
@ooade i'm using version 2.0.0
react-click-away-listener@^2.0.0:
version "2.0.0"
resolved "https://registry.yarnpkg.com/react-click-away-listener/-/react-click-away-listener-2.0.0.tgz#b70e4b87f8529fef2ce658469f415f15fc689c83"
integrity sha512-tD32K4usq0v+JWgeP+8B2B84rSR8Gcvs92cnBvlZkkBrgjVWetQUuMCN7De3vyZ36UcOG97JOvWGevyTMEHtdw==
from react-click-away-listener.
Thanks.
I just updated the dependencies on the example and it works fine. Can you perhaps help recreate this on CodeSandbox and share? I'd appreciate that. 🙏
from react-click-away-listener.
Related Issues (19)
- Wrap children around the element passed through props, defaults to div if no element is specified HOT 2
- Update README to list the available APIs
- Portal HOT 12
- Add classname to the returned element HOT 8
- Warning when used within a form HOT 3
- Doesn't trigger with right click HOT 2
- Memory Leak HOT 4
- Click inside of div on react-icons icon calls OnClickAway HOT 5
- Add mouse event and touch event props for more flexibility HOT 1
- React 17 has Error: Function components cannot be given refs. Attempts to access this ref will fail. HOT 7
- Could not resolve dependency: npm ERR! peer react@"^17.0.2" from [email protected] HOT 1
- an error appear in console when you add touchEvent HOT 2
- v2.2.0 introduced a breaking change by dropping React 17 support HOT 2
- Let click-away event do not report if we click / focus the children of the element. HOT 2
- Click on iframe elements doesn't trigger listener HOT 3
- OnClickAway trigger when I switch browser tab HOT 4
- onClickAway should return the fired event HOT 1
- v1.1.0 does not appear to be passing Event HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from react-click-away-listener.