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

Title as a function #30

Closed
quentinus95 opened this issue Jan 7, 2018 · 2 comments
Closed

Title as a function #30

quentinus95 opened this issue Jan 7, 2018 · 2 comments

Comments

@quentinus95
Copy link

Hi,

I need to find a way to recompute the tooltip title when it is displayed. Currently I'm displaying a timestamp. When the timestamp changes, no problem, everything is updated properly.

Now I want to improve UX by replacing the timestamp with a timeago sentence (e.g. "3 minutes ago") using moment.js

I can do it but the displayed timeago sentence will never change because the underlying data does not.

Is there a way to call the moment.js function when the user hovers the button so I can display the proper, actualized timeago sentence?

Thanks!

@KABBOUCHI
Copy link
Owner

You can't use Date in computed properties, you need to manage date by yourself

e.g: https://www.webpackbin.com/bins/-L2LujKDBC5gn_MX-rXA

@quentinus95
Copy link
Author

Thanks a lot!

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