Get 2024 Templates Mega Bundle!19 Bootstrap HTML, Vue & React Templates + 3 Vector Sets
Get for 99$

Dropdown not working within new components


When working with opening new components within v-for, since they are added after page-load, the dropdowns are not loading:


data-kt-menu-trigger="click" data-kt-menu-placement="bottom-start" data-kt-menu-overflow="true"

class="menu menu-sub menu-sub-dropdown" overflow:scroll;" data-kt-menu="true"


And they are placed in divs, so that should not be the issue


Text formatting options
Submit

Replies (1)


Hi,

Thank you for reaching out to us.

Please be aware that our TypeScript Menu component is initialized during the Vue component's mounted event. An example of initialization can be found in the file src/core/plugins/keenthemes.ts. If you're rendering your data asynchronously using the v-for directive, the menu instances may not be initialized. To fix this menu issue, you can recall the menu reinitialization function once your data is received and the menu elements are rendered.


MenuComponent.reinitialization();


Regards,
Lauris Stepanovs,
Keenthemes Support Team


Text formatting options
Submit
Text formatting options
Submit