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

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


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 (4)


to

Subscription List

click

Actions

Redirect to dashboard

but if i refresh at

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
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  :(