-
Notifications
You must be signed in to change notification settings - Fork 14
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
Separate language for each component instance in LitElement #19
Comments
You can actually see this in action even in your CodePen demo. I made a fork where I use the same component twice: https://codepen.io/peschee/pen/QWywKdM?editors=1010 Changing the language in one component affects the other one and vice versa. Ideally, the language should be contained to one instance of a component. |
I think I figured it out. Im my case (using Since use(language).then(() => this.requestUpdate()); I have forked the CodePen example with a working version of this: |
Sorry, I have to reopen this. There seems to be an issue with using properties & attributes. I have extended my last example with a https://codepen.io/peschee/pen/mdVyQmQ The language in both components is always set to the property of the last component initialized. Any ideas on how to solve this? |
Hello, this issue is still existing. Is there a way to fixed it @andreasbm ? |
I just noticed that using multiple web component instances will always set the language in all components to the one defined / used in the last component. I assume this is because the language event used to determine / set the language is global and all component instances listen to the same event?
I will try to make a reproducible case online for this.
The text was updated successfully, but these errors were encountered: