-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
initTEn not initialize correctly #1891
Comments
Hi! Are you using
Checkout the api sections of your components: I have also added a task to take a closer look at |
I am having a similar issue with the Select component. onMounted(() => { Neither with the initTE or the JS getInstance method can I get the selects to work with a search box once the router performs a new visit, they only load correctly on an entire page refresh (F5). |
Thanks You. Now My code is work , the problem is tw-element beta3 so i change to beta2 it work normally . |
I can confirm that beta3 or 1.0.0-rc.1 leads to the same issue on angular with angular routes. Going back to beta2 is also my current solution since I dont get the proposed snippet:
In my case it's about the Select and Input component from tw-elements. I suspect it is related to every component which relies on initTE({}) |
I am having a similar issue in my Next.JS project.... when use router to nav back... |
We are going to update the Example of usage:
|
Hi @juujisai, your suggestion is work. But I found a new problem, where the select component will duplicate x times the button is pressed.
Here's the screenshot: |
import { Datepicker, Input, initTE } from "tw-elements";
export default {
setup() {
onMounted(() => {
initTE({ Datepicker, Input });
}) here i use vue3 and i use tw-element beta3 but it error render input when the first time render it work but when i click to the other component and comeback to component that contain input tw-element it say like this ERROR
Cannot read properties of null (reading 'setAttribute')
TypeError: Cannot read properties of null (reading 'setAttribute')
at eval (webpack-internal:///./node_modules/tw-elements/dist/js/tw-elements.es.min.js:133:4536)
at il (webpack-internal:///./node_modules/tw-elements/dist/js/tw-elements.es.min.js:48:2829) help fix me please
The text was updated successfully, but these errors were encountered: