I want to dynamically fetch data in my tooltip and first show something like "Fetching data" and then show the value once http call completes. However, if I change the text binding, it does not update the tooltip until the next time I hover over the item.
I have created this where clicking on the item triggers a change in the value. But you can see that the tooltip text does not change until I leave and re-hover.
https://stackblitz.com/edit/ngx-bootstrap-ee5w8k
ngx-bootstrap: "^2.0.0-beta.11"
Angular: 5+
Angular CLI
that's true
when we were implementing tooltips I had 2 options:
as you can guess we took a second pass, but in latest angular version there are ways to get those two,
so I will try too
Thank you, appreciate it. Alternatively, maybe add a method that can be called from the component to refresh the tooltip?
It's basically hide()/show()
Yes, but that removes the tooltip and adds it back. A refresh method which would only change the text in the tooltip would be nice
Still facing the same issue.. using ngx-bootstrap 3.0.1
I think the refresh would be really helpfull.
@aks1994 you can use a template in tooltip content
(https://valor-software.com/ngx-bootstrap/#/tooltip#custom-content-template)
@filipemansano your solution works flawlessly.
cheers
Most helpful comment
Still facing the same issue.. using ngx-bootstrap 3.0.1