react-cool-onclickoutside
react-cool-onclickoutside copied to clipboard
How can I get this work for a node element that already has a ref
ISSUE DESCRIPTION: I am trying to use the lib to close a modal dialog whenever a click happens outside the modal(on backdrop), but the dialog itself has a ref for its main functionality.
SNIPPET:
QUESTION: Is there any workaround to get this work for a node element that already has a ref (for the dialog in the given specific case) ?
Have you tried passing refs in the options? https://github.com/wellyshen/react-cool-onclickoutside?tab=readme-ov-file#use-your-own-ref