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

get is invoked when the v-wait is not complete. #88

Open
wizardnet972 opened this issue Mar 8, 2020 · 0 comments
Open

get is invoked when the v-wait is not complete. #88

wizardnet972 opened this issue Mar 8, 2020 · 0 comments

Comments

@wizardnet972
Copy link

I don't know if it bug or not, but I think that it is unexpected behavior happens here.
I want to load some data, and only when the data is complete I want to run the JavaScript and other calculations in the component.

So I write the following code and I can see that some is invoke before the data is complete. which is a problem because sometimes I make a heavy calculation that check for property if exist (when the data is resolve then it exist), and sometimes it can move on a hardened or million of items in the array unnecessary for now, because the data is not complete.

All of that can take too long and make the application be much slower. (because now it take 1 time to check and gets null, and next time check and gets all the data).

<v-wait for="data">
  <template slot="waiting">
     <div>wait...</div>
  </template>

 {{some}}
</v-wait>

and in the component script I have a getter:

get some() {
    console.log('in some');
   // make a very heavy calculation here...
    return true;
}

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

1 participant