When my app load data from server, there is a loading spinner as per the attached image. How can I disable this feature? Thanks
Or I really need to modify it according to instruction here:
When my app load data from server, there is a loading spinner as per the attached image. How can I disable this feature? Thanks
Or I really need to modify it according to instruction here:
Hello. Please try:
anvil.server.call_s
Thanks to your code, I found the document and changed the code. But unfortunately, the spinner still shows, is it a bug or I did something wrong?
I have to use anvil.server.no_loading_indicator: block:
https://anvil.works/docs/server#suppressing-the-spinner
Hmm, what I shared should work. Unless you share your code I am unable to tell if you did anything incorrectly.
I guess I found that anvil.users.get_user()[‘email’] causes the issue:
self.label_1.text = anvil.server.call_s('testSpinner', anvil.users.get_user()['email'])
Replacing the function with a string, this code just works perfectly fine
self.label_1.text = anvil.server.call_s('testSpinner', 'a@a.com')
If I had to guess it would be because anvil.users.get_user()
has to hit the server. For me personally, especially for security’s sake, I check current user details on the server since the server already knows about such things.
anvil.server.call_s does disable the spinner. You are right, anvil.users.get_user() calls the server and generates the spinner by default.
Thanks so much for your help