How to rebind tailwind element events to dynamically inserted HTML content #1405
Replies: 2 comments 1 reply
-
Can you check if importing js file like this: Also keep in mind that all data attributes changed into |
Beta Was this translation helpful? Give feedback.
-
Is this why my select box is not rendering correcting in Vue.js with tw-elements styling? Testing the first select component example has me confused. https://tailwind-elements.com/docs/standard/forms/select/#docsTabsOverview I pasted the example select code in my Vue component, imported the package I updated my code to use:
Also note the second
|
Beta Was this translation helpful? Give feedback.
-
I have a component that get injected into DOM dynamically. The tailwind data-te-toggle, data-bs-target etc event binders do not work for the new content as these are inserted after the tailwind elements has binded with the prev DOM content. Im using tailwind elements with angular, so need a method that I can call in ngAfterViewInit that can rehook the tailwind events.
Also Im using tailwind-elements via import in my app component. (import 'tw-elements';)
If I want to reference the api in my component, te is undefined. How do I reference the imported tw-elements library in my component methods?
Beta Was this translation helpful? Give feedback.
All reactions