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

Use a custom keyName dynamically #215

Closed
KaelWD opened this issue May 14, 2018 · 7 comments
Closed

Use a custom keyName dynamically #215

KaelWD opened this issue May 14, 2018 · 7 comments

Comments

@KaelWD
Copy link

KaelWD commented May 14, 2018

In vuetify we use vue-meta if this.$meta exists, but I had to hard-code metaInfo and head (for nuxt). Is there a way for my library to dynamically use whatever keyName the end user passed in?

@atinux
Copy link
Member

atinux commented May 16, 2018

Hi @KaelWD

What if you could get it trought this.$meta().options.keyName?

I believe we should add it here: https://github.com/declandewet/vue-meta/blob/master/src/shared/%24meta.js#L14

Please mention me so I can get an email to follow this issue.

@KaelWD
Copy link
Author

KaelWD commented May 17, 2018

Yeah that should be good. Do you know how I could use that though? I had this before which worked fine in SSR, but I think caused a race condition on the client-side because it would sometimes not apply.

@chrisvfritz
Copy link

chrisvfritz commented May 17, 2018

@atinux Just mentioning you on this as you requested. 🙂

@miniplus
Copy link

miniplus commented Jan 17, 2019

Just ran into this issue with vuetify having the hardcoded value and my project using a different keyName. Took me quite some time to debug.

As this issue is half a year old, has this been considered? Just looking for an update @atinux.

Thanks! 🙂

@pimlie
Copy link
Collaborator

pimlie commented Mar 8, 2019

vue-meta v2 will add a getOptions method so you can call this.$meta().getOptions().keyName

pimlie added a commit to pimlie/vue-meta that referenced this issue Mar 8, 2019
@theprojectsomething
Copy link

@pimlie this.$meta().getOptions() is currently listed in the 1.6 API docs: https://vue-meta.nuxtjs.org/api/#meta-getoptions

@pimlie pimlie closed this as completed in 31e975d Apr 20, 2019
@pimlie
Copy link
Collaborator

pimlie commented Apr 20, 2019

This issue has been closed as changes for it are included in the v2 release candidate. Please help us testing the release candidate and report any follow-ups in a new issue

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

No branches or pull requests

7 participants