ngneat / helipopper

🚁 A Powerful Tooltip and Popover for Angular Applications

Home Page:https://ngneat.github.io/helipopper/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Add lifecycle hooks per variation

frct1 opened this issue · comments

I'm submitting a...


[ ] Regression (a behavior that used to work and stopped working in a new release)
[ ] Bug report  
[ ] Performance issue
[x] Feature request
[ ] Documentation issue or request
[ ] Support request
[ ] Other... Please describe:

Current behavior

Currently its working only in case if we define onShow hook at global level but not in a specified variation.
Following source code:

this.globalConfig.onShow?.(instance);
onShow hook is calling only from global settings but i think we can add check is variation contain lifecycleHooks and then call them instead of global one.

Expected behavior

Ability to define lifecyclehooks in directive options or at variation level

What is the motivation / use case for changing the behavior?

Main motivation is to add more freedom of customization for tippy. My case is to hide any other tooltips that already opened to leave only single tooltip visible.

Environment


Angular version: X.Y.Z


Browser:
- [ ] Chrome (desktop) version XX
- [ ] Chrome (Android) version XX
- [ ] Chrome (iOS) version XX
- [ ] Firefox version XX
- [ ] Safari (desktop) version XX
- [ ] Safari (iOS) version XX
- [ ] IE version XX
- [ ] Edge version XX
 
For Tooling issues:
- Node version: XX  
- Platform:  

Others:

WDYT ?

Generally speaking, I don't see why not.
Please share a short design before opening a PR just to make sure we are on the same page 🙂