Extends react-click-outside
to also work with other events like mousedown
#26
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
We had a desire to be able to dismiss components on a mousedown rather than a click event. This PR lets users choose to listen for other "mouse like" events targeting outside the component. Full backwards compatibility is retained with existing code.
In addition as part of doing a private scoped release I took it upon myself to remove the
dist/index.js
file from the repo and added aprepublishOnly
npm script which will automatically build this file when publishing so that it is not necessary to commit to repo. Let me know if you'd like me to revert this portion of the PR as I know it is a side issue.