Hi!
On the customer list page we have a data table and for each row we have a dropdown with actions. When I visit the customer page from another page the dropdown doesn't open, when I refresh the page it starts working.
Here is that part HTML:
<template v-slot:actions="{ row: customer }">
<a
href="javascript:void(0)"
class="btn btn-sm btn-light btn-active-light-primary"
data-kt-menu-trigger="click"
data-kt-menu-placement="bottom-end"
data-kt-menu-flip="top-end"
>Actions
<KTIcon icon-name="down" icon-class="fs-5 m-0" />
</a>
<!--begin::Menu-->
<div
class="menu menu-sub menu-sub-dropdown menu-column menu-rounded menu-gray-600 menu-state-bg-light-primary fw-semibold fs-7 w-125px py-4"
data-kt-menu="true"
>
...
</div>
<!--end::Menu-->
</template>
Hi,
Do you render your table rows asynchronously?
Please note that our TypeScript components initialize when the component is mounted. You can find an initialization example in the file src/core/plugins/keenthemes.ts. When you fetch your data from the server, rows in the table get rerendered asynchronously which might prevent the global initialization. To fix this issue, you should invoke the menu reinitialization function once you've received your data and the table rows have been rendered.
MenuComponent.reinitialization();
Hi,
Thank you!! It works.