Andarist / Andarist/use-onclickoutside
Disabling useOutsideClick callback for specified elements
- Lingua principale
- TypeScript
- Stelle
- 496
- Fork
- 27
- Metriche di merge delle PR
- Nessuna PR unita negli ultimi 30g
Descrizione
What's your thoughts on adding similar functionality to the [react-onclickoutside library](https://github.com/Pomax/react-onclickoutside#marking-elements-as-skip-over-this-one-during-the-event-loop) for disabling outside click callback on certain specified elements?
See this gif for an example. I'd like to disable the callback for the toggler.

Right now I'm doing this, which works fine for that use case but it'd be nice to have this included with the library:
```javascript
const ref = useRef(null);
useOutsideClick(ref, e => {
if (!e.target.parentElement.className.includes('ignore-onOutsideClick')) {
toggle();
}
});
```
Guida per i contributori
Nessuna guida per i contributori indicizzata per questo repository
Valutazione
Questa issue non è ancora stata valutata.