KTDatatable empty data and get data from api Action will go to home page

Hi Team:

I found a bug
When I go to firstpage
And go to demo1's subscription-list

if my data has data it is ok to click Actions
but if my init data is empyt it will go back to homepage

https://youtu.be/7U32Y9kIN7U

Text formatting options
Submit
Here's a how to add some HTML formatting to your comment:
  • <pre></pre> for JS codes block
  • <pre lang="html"></pre> for HTML code block
  • <pre lang="scss"></pre> for SCSS code block
  • <pre lang="php"></pre> for PHP code block
  • <code></code> for single line of code
  • <strong></strong> to make things bold
  • <em></em> to emphasize
  • <ul><li></li></ul>  to make list
  • <ol><li></li></ol>  to make ordered list
  • <h3></h3> to make headings
  • <a></a> for links
  • <img> to paste in an image
  • <blockquote></blockquote> to quote somebody
  • happy  :)
  • shocked  :|
  • sad  :(

Replies (4)

http://203.204.37.201:8080/#/dashboard

to

Subscription List

click

Actions

Redirect to dashboard

but if i refresh at http://203.204.37.201:8080/#/apps/subscriptions/subscription-list

It is ok

Hi Ting,

It might be related to MenuComponent initialization. Could you please try to call MenuComponent.reinitialization() function inside your component onMounted?

onMounted(() => {
MenuComponent.reinitialization();
});


Regards,
Lauris Stepanovs,
Keenthemes Support Team

Hi Team:

It Works

import { MenuComponent } from "../../assets/ts/components";


onMounted(async () => {
await ApiService.query("get_data", {}).then((response) => {
console.log(response);
data.value = response.data;
});
MenuComponent.reinitialization();
});


Thanks

BR,
Alan Ting

Glad to hear that. All the best with your project!

Your Support Matters!

We will highly appreciate your Metronic Review on Themeforest.
Please go to Themeforest Downloads page, select Metronic & leave your feedback.
Text formatting options
Submit
Here's a how to add some HTML formatting to your comment:
  • <pre></pre> for JS codes block
  • <pre lang="html"></pre> for HTML code block
  • <pre lang="scss"></pre> for SCSS code block
  • <pre lang="php"></pre> for PHP code block
  • <code></code> for single line of code
  • <strong></strong> to make things bold
  • <em></em> to emphasize
  • <ul><li></li></ul>  to make list
  • <ol><li></li></ol>  to make ordered list
  • <h3></h3> to make headings
  • <a></a> for links
  • <img> to paste in an image
  • <blockquote></blockquote> to quote somebody
  • happy  :)
  • shocked  :|
  • sad  :(
Text formatting options
Submit
Here's a how to add some HTML formatting to your comment:
  • <pre></pre> for JS codes block
  • <pre lang="html"></pre> for HTML code block
  • <pre lang="scss"></pre> for SCSS code block
  • <pre lang="php"></pre> for PHP code block
  • <code></code> for single line of code
  • <strong></strong> to make things bold
  • <em></em> to emphasize
  • <ul><li></li></ul>  to make list
  • <ol><li></li></ol>  to make ordered list
  • <h3></h3> to make headings
  • <a></a> for links
  • <img> to paste in an image
  • <blockquote></blockquote> to quote somebody
  • happy  :)
  • shocked  :|
  • sad  :(