Sticky component with Vue3

Hi,

I try to use the sticky component for vue, but the sticky doesn't work after a route change. It will only work on a fresh page load.

Please advice.

Thank you

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

Hi,

Could you please attach the HTML code of your sticky component?

If you are using the latest Metronic v8.0.37 then it should work, since we are initializing a StickyComponent on each route separately. Check file core/plugins/keenthemes.ts.

You can try to reinitialize StickyComponent inside the onMounted function:

import {
StickyComponent
} from "@/assets/ts/components";

StickyComponent.reinitialization();

Hi,

I have try to reinitialization but it does not work.
I have take a look at your demo page on the "Add Subscriber" which is using the sticky component as well, but it is having the same issue.

It will work on a refresh, but after a route change out and back in, the sticky function is gone.

Hi,

Reproduced the issue, it is related to our StickyComponent and in some scenarios, it doesn't work.

We will need some time to check this issue, we will provide a solution as soon as possible.

Thank you!

Hi,

Thanks, hope to hear from you guys soon.

Hi Nicholas!

Thank you for your feedback.

We did some refactoring for our StickyComponent, which will fix this issue, we will include a fix into the next Metronic v8.0.38 releases, we are planning a release for the next week.

Please follow us at http://twitter.com/keenthemes to stay updated.

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