Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

lazy load not working #18

Open
kauenzo opened this issue Sep 19, 2023 · 2 comments
Open

lazy load not working #18

kauenzo opened this issue Sep 19, 2023 · 2 comments

Comments

@kauenzo
Copy link

kauenzo commented Sep 19, 2023

All my components are mounted when i start the app. Is possible to fix lazy load? Because i don't want the onMounted propriety to be executed when i start my app. There was the same issue in the legacy form-wizard, #356 and #377

<template>
  <div>
    <form-wizard @onComplete="onComplete">
      <tab-content :lazy="true">
        <FirstStep message="step content 1" />
      </tab-content>
      <tab-content :lazy="false">
        <SecondStep message="step content 2" />
      </tab-content>
      <tab-content> finally </tab-content>
    </form-wizard>
  </div>
</template>
<script setup>
import { defineProps, onMounted } from 'vue'
defineProps({
  message: String
})

onMounted(() => {
  console.log('mounted first step')
})
</script>
@parsajiravand
Copy link
Owner

@kauenzo
Thanks for your report . i will check this issue.

If you explain more it can help alot.
Do you want render WizardStep component and lazyload TabContent component or both of them hide when you set lazy?

@kauenzo
Copy link
Author

kauenzo commented Sep 20, 2023

@parsajiravand I want to render tabContent components only when it has in its index. Actualy, all components are mounted when app is start, this makes the onMounted property to be executed in start

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants