Skip to content
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

reactive text #46

Open
nincorada opened this issue May 6, 2020 · 3 comments
Open

reactive text #46

nincorada opened this issue May 6, 2020 · 3 comments

Comments

@nincorada
Copy link

nincorada commented May 6, 2020

How can i make the displayed text reactive?
I am using this with vue and vue-i18n, a translator.
I am passing the data from computed into :data-pt-title="sTooltip"
and sTooltip is in the computed object that returns this.$i18n.t('path-to-text')

@wintercounter
Copy link
Owner

You can try to add data-pt-observer="true". This will watch for attribute changes also.

@nincorada
Copy link
Author

the page freezed when i added that attribute

@wintercounter
Copy link
Owner

I never used Vue with jQuery, but I'm pretty sure it's an anti-pattern in general. I think you'll need to force a rerender or something, so the old tooltip element will be removed, and a new will be added.

Alternatively you can also set it manually using $(el).protipSet({ title: 'My title' }).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants