How can I hide the loading indicator when no items are returned?
How can I hide the loading indicator when no items are returned?
SoN9ne
Posts: 7Questions: 1Answers: 0
Hello,
I finally got the loading indicator working but I have one issue with it. I have a problem with datatables not hiding the loading indicator when there are no items returned. Basically, it shows the single row that says no items but under that is still the loading indicator. is there a toggle to hide that somehow or is this logic I need to add manually?
I have [code]"sScrollY": 600[/code] which gives me a fixed height for the table. So when there is a single row the [code]DTS_Loading[/code] div is still visible.
Any suggestions are helpful.
I wasn't able to give a link as this is only local dev only right now and there are too many required files to get a prototype on jsfiddle. Sorry :(
Is this normal behavior? What should happen to the loading indicator when there is only 1 row and there is a fixed height. I haven't tested this yet but it seems it will always show the indicator if the results don't fill the table.
I did notice it does it here too: http://datatables.net/release-datatables/extras/Scroller/server-side_processing.html
(do a search of zzzz)
So I am guessing I need my own logic to handle this.
Thanks for any info
Jeremy
I finally got the loading indicator working but I have one issue with it. I have a problem with datatables not hiding the loading indicator when there are no items returned. Basically, it shows the single row that says no items but under that is still the loading indicator. is there a toggle to hide that somehow or is this logic I need to add manually?
I have [code]"sScrollY": 600[/code] which gives me a fixed height for the table. So when there is a single row the [code]DTS_Loading[/code] div is still visible.
Any suggestions are helpful.
I wasn't able to give a link as this is only local dev only right now and there are too many required files to get a prototype on jsfiddle. Sorry :(
Is this normal behavior? What should happen to the loading indicator when there is only 1 row and there is a fixed height. I haven't tested this yet but it seems it will always show the indicator if the results don't fill the table.
I did notice it does it here too: http://datatables.net/release-datatables/extras/Scroller/server-side_processing.html
(do a search of zzzz)
So I am guessing I need my own logic to handle this.
Thanks for any info
Jeremy
This discussion has been closed.
Replies
In the case of my example you would use `bScrollCollapse:true` to fix it.
Allan