ngneat / helipopper

🚁 A Powerful Tooltip and Popover for Angular Applications
https://ngneat.github.io/helipopper/
MIT License
405 stars 41 forks source link

useHostWidth input does not respect value changes from true to false #155

Open baleeds opened 7 months ago

baleeds commented 7 months ago

I'm submitting a...


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

Current behavior

Currently, the input for useHostWidth on the TippyDirective doesn't apply changes to the input. For instance, if I start with [useHostWidth]="true" and then switch to false, the tippy will continue to use the host's width

Expected behavior

The input for useHostWidth should respect any changes after the directive has been initialized.

Minimal reproduction of the problem with instructions

I have coded up a reproduction in this repository. Instructions are shown when you run the app. https://github.com/baleeds/helipopper-bug

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

As far as I can tell, all other inputs respect value changes. Consistency dictates that useHostWidth should do the same. We see the bug in our app when we want to watch a dimension of the parent element as the source for determining whether the tippy should use the host's width.

Environment


Helipopper version: 9.1.0

Angular version: 17.0.9


Browser:
- [x] 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: