-
Notifications
You must be signed in to change notification settings - Fork 1.8k
Show "searching..." + loading spinner when using refresh
#919
Comments
This is a nice feature that I would like too. My use case is that my list is just too long and it takes a little time to load. |
+1 |
2 similar comments
+1 |
+1 |
++1 |
+1 |
3 similar comments
+1 |
+1 |
+1 |
+2 Not an elegant solution, but what I have done is this: At the start of my 'refresh' function, I create one element in the return array, and I set the first item, and the element in the item that I use to display, in the array to something like this: 'vm.myDisplayList = { displayText: 'loading your data ... '; }' Obviously when your data returns, and is bound back to vm.myDisplayList, then it will show your data. So my theory is to artificially add a single item into the array while waiting for the data to load, and that item displays a loading message. It works for me, hope this helps someone. |
+1 |
I think this is something most people like to have implemented differently. To accommodate for everyones wishes would complicate the code quite a bit (as you can already see with other features). It's easy for people to currently implement this themselves so I don't think it's good idea to put this into the library. I think it's better if there would be some good documentation on the various ways people can implement this themselves. We use We also have an .loading:after {
z-index: 10;
border: solid rgba(9, 62, 78, .2);
border-top-color: #189dc8;
-webkit-border-radius: 50%;
-moz-border-radius: 50%;
border-radius: 50%;
-webkit-animation: spin 1s infinite linear;
-moz-animation: spin 1s infinite linear;
animation: spin 1s infinite linear;
content: "";
position: absolute;
left: 50%;
top: 50%;
width: 40px;
height: 40px;
margin: -20px 0 0 -20px;
border-width: 5px;
} |
+1 |
+30 |
+1 |
1 similar comment
+1 |
what I did,
this could be extended with 'no-data-found' class if response list is empty, and nice red cross as input addod |
+1 |
#1780 Display loading text on refresh |
I try to create a loading text that would be displayed if refreshAttr return $http promise. |
Closed by #1779 |
I know that I can use
refresh
to asynchornously fetch data from API server. Is there a way for me to give some visual indication to the user that we're loading the data? Similar to how select2 has a spinner, and a "Searching..." text: http://i.imgur.com/3BsemlD.pnghttp://select2.github.io/select2/ (please see the Loading Remote Data example)
Or if this is not currently supported, I'm happy to open the code and contribute a patch, I just need to be pointed at a right direction.
Thanks!
The text was updated successfully, but these errors were encountered: