How to use the react-onclickoutside/decorator function in react-onclickoutside

To help you get started, we’ve selected a few react-onclickoutside examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github zalando-stups / yourturn / client / lib / violation / src / violation / filter-dropdown.jsx View on Github external
unselected).map(i => )}
                            
                        
                     :
                    null}
                ;
    }
}
FilterDropdown.displayName = 'FilterDropdown';

export default listenToOutsideClick(FilterDropdown);
github dternyak / React-Redux-Flask / static / src / components / Header / index.js View on Github external
function mapStateToProps(state) {
    return {
        token: state.auth.token,
        userName: state.auth.userName,
        isAuthenticated: state.auth.isAuthenticated
    }
};

function mapDispatchToProps(dispatch) {
    return bindActionCreators(actionCreators, dispatch)
};

@connect(mapStateToProps, mapDispatchToProps)
@listensToClickOutside()
export class Header extends Component {
    constructor(props) {
        super(props);
        this.state = {
            open: false
        }

    }

    dispatchNewRoute(route) {
        browserHistory.push(route)
        this.setState({
            open: false
        })

    }
github zalando-stups / yourturn / client / lib / common / src / components / functional / OutsideClickAwareCalendar.jsx View on Github external
/>
        );
    }

}

OutsideClickAwareCalendar.propTypes = {
    defaultValue: React.PropTypes.instanceOf(Date),
    maxDate: React.PropTypes.instanceOf(Date),
    minDate: React.PropTypes.instanceOf(Date),
    onClickOutside: React.PropTypes.func.isRequired,
    onDatePicked: React.PropTypes.func.isRequired
};


export default listenToOutsideClick(OutsideClickAwareCalendar);
github zalando-stups / yourturn / client / lib / violation / src / violation-card / violation-card.jsx View on Github external
}
}
ViolationCard.displayName = 'ViolationCard';
ViolationCard.contextTypes = {
    router: React.PropTypes.object
};
ViolationCard.propTypes = {
    autoFocus: React.PropTypes.bool,
    onResolve: React.PropTypes.func,
    onClickOutside: React.PropTypes.func,
    accounts: React.PropTypes.object,
    violation: React.PropTypes.object.isRequired,
    editable: React.PropTypes.bool
};

export default listenToOutsideClick(ViolationCard);
github zalando-stups / yourturn / client / lib / violation / src / violation / date-dropdown.jsx View on Github external
:
                    null}
                ;
    }
}

DateDropdown.displayName = 'DateDropdown';

DateDropdown.propTypes = {
    onUpdate: React.PropTypes.func,
    range: React.PropTypes.array,
    title: React.PropTypes.string
};

export default listenToOutsideClick(DateDropdown);

react-onclickoutside

An onClickOutside wrapper for React components

MIT
Latest version published 7 months ago

Package Health Score

79 / 100
Full package analysis