Super Sale Limited Time 50% OFF for All-Access Plans
Save 50% Now

Datatable with dropdown action


When we use Datatable component with action button in row, its all ok with static data, but with dynamic data buttons don't work. Looks like its not initialized. Dara recieved on hook OnMounted
Here code:


<template v-slot:action="{ row: invoice }">
<div class="d-flex text-gray-600 flex-column justify-content-center">
<div class="me-0">
<button
class="btn btn-sm btn-icon btn-bg-light btn-active-color-primary"
data-kt-menu-trigger="click"
data-kt-menu-placement="bottom-end"
data-kt-menu-flip="top-end"
>
<i class="bi bi-three-dots fs-3"></i>
</button>
<Dropdown />
</div>
</div>
</template>


Text formatting options
Submit
Click any option to insert into your comment. Select text first to wrap it.
  • **text** to make things bold
  • *text* to emphasize
  • ### Heading to make headings
  • [link text](url) for links
  • ![alt text](image-url) to paste in an image
  • - item to make a list
  • 1. item to make an ordered list
  • > quote to quote somebody
  • `code` for single line of code
  • ```js ... ``` for JS code block
  • ```html ... ``` for HTML code block
  • ```scss ... ``` for SCSS code block
  • ```php ... ``` for PHP code block
  • --- for a horizontal rule
  • happy  :)
  • shocked  :|
  • sad  :(

Replies (1)


Hi,

I am sorry to hear that you faced this issue. I will do my best to help.

Please note that our ts components are initialized when the component is mounted you can find an initialization example in file src/core/plugins/keenthemes.ts, when you are fetching your data from the server rows are rendered asynchronously, to fix menus you should call menu reinitialization function manually when you received your data and rows in a table have been rendered.


MenuComponent.reinitialization();


Regards,
Lauris Stepanovs,
Keenthemes Support Team


Text formatting options
Submit
Click any option to insert into your comment. Select text first to wrap it.
  • **text** to make things bold
  • *text* to emphasize
  • ### Heading to make headings
  • [link text](url) for links
  • ![alt text](image-url) to paste in an image
  • - item to make a list
  • 1. item to make an ordered list
  • > quote to quote somebody
  • `code` for single line of code
  • ```js ... ``` for JS code block
  • ```html ... ``` for HTML code block
  • ```scss ... ``` for SCSS code block
  • ```php ... ``` for PHP code block
  • --- for a horizontal rule
  • happy  :)
  • shocked  :|
  • sad  :(
Text formatting options
Submit
Click any option to insert into your comment. Select text first to wrap it.
  • **text** to make things bold
  • *text* to emphasize
  • ### Heading to make headings
  • [link text](url) for links
  • ![alt text](image-url) to paste in an image
  • - item to make a list
  • 1. item to make an ordered list
  • > quote to quote somebody
  • `code` for single line of code
  • ```js ... ``` for JS code block
  • ```html ... ``` for HTML code block
  • ```scss ... ``` for SCSS code block
  • ```php ... ``` for PHP code block
  • --- for a horizontal rule
  • happy  :)
  • shocked  :|
  • sad  :(