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

[Select] [duplication of select component when reinitializing it] #2345

Open
memiljamel opened this issue Jun 19, 2024 · 1 comment
Open

Comments

@memiljamel
Copy link

I found the same problem here #1891. The solution provided works, but there are duplicate elements in the select component. I have also asked there, but there has been no response.

Here's the screenshot:
Capture

1

does anyone know why this happens?

@juujisai
Copy link
Contributor

Hi, the issue was closed thats why we missed it.

You can try checking whether the instance exists before calling initTE again (in side the life cycle method, or other place you are using it)

This could look something like this:

if (!Select.getInstance(mySelectInstance) {
  initTE({Select})
}

The initTE method with flag allowReinits creates a new instance for components and does not check whether components were initialized before or not. Checking whether the instance exists before calling it should work here

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