
Security News
High Salaries No Longer Enough to Attract Top Cybersecurity Talent
A survey of 500 cybersecurity pros reveals high pay isn't enough—lack of growth and flexibility is driving attrition and risking organizational security.
@gorangajic/react-outside-click
Advanced tools
React component to track clicks that happened outside of it.
React component to track clicks that happened outside of it. You just wrap the components you want to track if a click happened outside and ReactOutsideClick will execute a callback that you defined.
npm install react-outside-click
Import the component to your project and then wrap the nodes you want to track if an outside click happened. Example:
var React = require('react');
var OutsideClick = require('react-outside-click');
React.createClass({
onOutsideClick: function (event) {
console.log('click happened outside', event);
},
render: function () {
var styles = {
elem: {
width: '100px',
height: '50px',
backgroundColor: '#F00',
},
};
return (
<div>
<OutsideClick onOutsideClick={this._handleOutsideClick}>
<div style={styles.elem}>Click here</div>
</OutsideClick>
</div>
);
}
});
Property name | Description |
---|---|
component | String. The component that will wrap all the children. Default: div |
onOutsideClick | Function. Callback that will be called with the event object when an outside click happened. |
useCapture | Boolean. If true, the internal logic of this component will use the capture phase. Default: false |
BSD-3
FAQs
React component to track clicks that happened outside of it.
The npm package @gorangajic/react-outside-click receives a total of 6 weekly downloads. As such, @gorangajic/react-outside-click popularity was classified as not popular.
We found that @gorangajic/react-outside-click demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
A survey of 500 cybersecurity pros reveals high pay isn't enough—lack of growth and flexibility is driving attrition and risking organizational security.
Product
Socket, the leader in open source security, is now available on Google Cloud Marketplace for simplified procurement and enhanced protection against supply chain attacks.
Security News
Corepack will be phased out from future Node.js releases following a TSC vote.