-
Notifications
You must be signed in to change notification settings - Fork 3
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Repeated tooltips in <tr><td> does not show #2
Comments
Gonna check it. |
I finally solved it. |
@tanthammar I'm using Livewire as well - any hints for making this work with it would be greatly appreciated!! Thanks |
@ulfie22 <script src="https://unpkg.com/@popperjs/core@2"></script>
<script src="https://unpkg.com/tippy.js@6"></script>
<script>
document.addEventListener('turbolinks:load', () => {
tippy('[data-tippy-content]');
});
window.livewire.hook('afterDomUpdate', () => {
tippy('[data-tippy-content]');
});
</script> Then in any blade file: <anytag data-tippy-content="some tooltip"></anytag>
<anytag data-tippy-content="{{ $some_var }}"></anytag>
<anytag data-tippy-content="{{ $some_method() }}"></anytag> |
@tanthammar Thanks for the very complete explanation!! Livewire is really awesome but I've run into some issues trying to execute my javascript within it - I'll try this approach. Thanks again for the quick complete reply!! |
Thanks for the tip Tanthammar. I came across your post for the tippy issue rather than turbolinks issue, and for anyone else who might be in the same situation in my case I had to wrap your script:
within:
as mentioned at https://laravel-livewire.com/docs/lifecycle-hooks |
@neodisco That is strange, on my end it works without that wrapper. |
For anyone else who happens upon this, I got it to work like this:
|
I have a table with icons in a td.
I have wrapped an svg icon with the Popper tag.
The tooltip is only visible on the first row in the table.
The following rows does not show any tooltip.
This is in my blade file
This is the generated html
The text was updated successfully, but these errors were encountered: