jsgrid
jsgrid copied to clipboard
"noDataContent" text is shown during loading
Should be shown if the json web-response returns an empty object.
How to reproduce:
- go to http://js-grid.com/demos/odata-service.html
- press F5
- and you should see "No found" during the loading
I agree, looks like not something expected. Thanks for the report!
Any update on this issue? Thanks.
I still don't see a good solution to this one.
It happens because the data
option is an empty array on the grid creation, and grid has no items indeed. So technically, this is the right behavior.
We could show the grid without rows on the first load, but this also seems not correct. Imagine you have autoload: false
, and grid is not loading automatically, but you want to load data yourself, or even don't want to use controller and just set data
option when you want later. In this case you will have an empty grid, and this is not right behavior.
Feel free to share how you see the right behavior.
I would say all you need is if autoload: true
simply show the loading overlay until its been loaded and if no data comes back then show the noDataContext
. If data
has been specified on initialising then simply show the noDataContext
straight away.
hello, any solution?