You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The autoInit() method works as expected after navigating to a new route. However, if new DOM elements are injected dynamically (e.g., via v-if, v-for, or click events), autoInit() does not re-trigger, and those elements don’t get initialized properly.
Expected behavior
I'd like autoInit() to detect and initialize any newly added DOM elements, even when they are inserted after the initial route change.
Question
Is there a recommended way to manually or automatically re-trigger autoInit() when new components/elements are added to the DOM after interaction?
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
-
Hi Preline team 👋,
I'm using Preline UI in a Nuxt project with the following plugin setup:
Problem
The
autoInit()method works as expected after navigating to a new route. However, if new DOM elements are injected dynamically (e.g., viav-if,v-for, or click events),autoInit()does not re-trigger, and those elements don’t get initialized properly.Expected behavior
I'd like
autoInit()to detect and initialize any newly added DOM elements, even when they are inserted after the initial route change.Question
Is there a recommended way to manually or automatically re-trigger autoInit() when new components/elements are added to the DOM after interaction?
Beta Was this translation helpful? Give feedback.
All reactions