-
-
Notifications
You must be signed in to change notification settings - Fork 27
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
update(docs) created_at *not* automatically converted #268
Comments
I believe it's not automatic, you have to tell which fields you want converted, see https://mesqueeb.github.io/vuex-easy-firestore/extra-features.html#firestore-timestamp-conversion As a side note, if you ever want to persist the state locally using |
@louisameline - Thank you for the response. It's ok to work with .toDate() but I thought created_at and updated_at are transformed automatically to a date object before adding them to the local store according the documentation? |
I have tested again. Even if explained in the documentation, the transformation is not done automatically for created_at and updated_at. But it works when I configure it manually as described. So - is there any reason for that behavior that it's not done by default? |
You're right, I hadn't noticed that. I'll let @mesqueeb answer if it was his intention, but I must say that in my opinion, if the fields are currently not converted by default, it needs to stay that way, and it's the documentation which needs to be updated. And if they are converted, we should change that in v2 as by default, the state should not be tampered with. |
Ok, now it's clear to me. So it would be good to have the updated documentation :-) |
@scriptPilot It fell through the cracks 😆 I'll update the docs. After about two years of open source, I finally got accepted for Github Sponsors! 💜 github.com/sponsors/mesqueeb 💜A little about me:
If anyone was helped with vuex-easy-firestore, I'd greatly appreciate any support!
Going forward 👨🏼💻
|
First of all thank you for the great piece of code! Some trouble I have ... following the documentation I expect to get an object of items for a collection, where "created_at" is is a date object. But in fact I find only timestamps in the data object. Anything I misunderstood? Latest version in use.
The text was updated successfully, but these errors were encountered: