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

multiple instance on the same page #204

Open
clodoveo opened this issue Oct 17, 2024 · 2 comments
Open

multiple instance on the same page #204

clodoveo opened this issue Oct 17, 2024 · 2 comments

Comments

@clodoveo
Copy link

I'm trying to develop a widget that ideally should be instantiated multiple times on the same page. However, it is only being rendered for the first one in the list. Is it possible to have more than one with the same name but for example different IDs?

@bmomberger-bitovi
Copy link
Contributor

bmomberger-bitovi commented Dec 6, 2024

Hi @clodoveo,

Can you show me some example code? I've definitely done experiments in the past with multiple instances of the same component and didn't have this problem, so I might be able to find the root of the problem if I see how you're using it.

@subramanian-iouring
Copy link

subramanian-iouring commented Jan 10, 2025

@bmomberger-bitovi
While using same web component in html with different params, facing issues like collapse the data params between web components.

<div class="menu1"> 
  <web-app name="sam" age="32"></web-greeting>
</div>
<div class="menu2">
  <web-app name="jack"></web-greeting>
</div>

From above code, we are allowing any one of div to DOM, while showing 1st div, 2nd div is not DOM.
So when we try to remove 1st div and append 2nd div in DOM. we are getting age props here too.

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

3 participants