-
-
Notifications
You must be signed in to change notification settings - Fork 131
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
Regression, non-blocking model support and initial page of results not hiding infinityLoader #313
Comments
@Duder-onomy 👋. Great catch! 👍 I believe I made a mistake. Here we are observing on didInsertElement. HOwever, at this point in the lifecycle, it is a promise. In the previous solution, it was able to observe the resolved value. So I think there is a slight difference in those two approaches. When we are checking state ( So we either revert to the old approach and try to solve hide on first load or we come up with a diff solution. Does this make sense? |
I am starting to understand what is going on . These are the minimal changes i needed to make to get it working for me in my use case... but a bunch of other tests are failing: Duder-onomy@1252d38 I will spend some more time right now. Getting closer. |
Aight, spent another few mins on this one today. Change the will insert element hook:
Then all accessors use the then-able:
This commit, Duder-onomy@76ac028?diff=split seems to fix everything. I went through all the example routes in the dummy repo, and everything seems to work as expected. |
@Duder-onomy That looks great! One outstanding question on my end - why can't we just wrap
|
@Duder-onomy Would you like to put up a PR for the work you did? I can help if you are strapped for time 🙌 |
Honestly, you can probably fix this allot faster than I can. I think I understand everything that is happening except the loadPrevious parts of the code. But yeah, if you take a stab at it, shoot me a message and I will pull it into TheDyrt and see if it fixes the issue. |
Ok perfect! Yeah I think your solution is it 👍. I'll try to do it this weekend |
Hey,
Found an issue with the latest version 1.1.2
Seems that if using a non blocking model hook + hideOnInfinity and there is only one page of results, never seems to hide the infinity loader.
Here is a commit I made on my fork to demonstrate the issue, had to hack in some extra param support to the mirage serializer.
If you pull that commit in, you will see that the infinityLoader never drops.
Debugging this, it seems like the observer added here does not seem to observe through the promise proxy of the non-blocking model.
I thought about something like this:
That does not work ^.
Please let me know if there is anything I can do to help.
If you know the cause and can pseudo code it to me I don't mind adding failing tests and PR'ing. Just a little confused on what is happening under le hood.
The text was updated successfully, but these errors were encountered: