vue-wait icon indicating copy to clipboard operation
vue-wait copied to clipboard

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

Open wizardnet972 opened this issue 4 years ago • 0 comments

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;
}

wizardnet972 avatar Mar 08 '20 17:03 wizardnet972