Currently the data-table shows "No data available" when loading - if a response takes a while, a user might ignore the loading progress bar and assume that there is no data to display and leave the page.
Being able to change the text via a loading-text property would probably be enough to solve this problem.
Currently adding a no-data slot appears to replace the loading text which is why I suggested possibly adding a loading slot but I think as long as the no-data slot doesn't replace the proposed loading-text property while it's loading then a loading slot probably wouldn't be needed.
Couldn't you in your no-data slot use a data prop that you update in your data getting function? Like:
https://codepen.io/blalan/pen/PdNypE
Or Even:
https://codepen.io/blalan/pen/xaVyyE
Yeah I think we can just use Vue here. I think what @blalan suggested is perfect 😄
And that's what I'm doing currently however things can get a bit messier which trying to do something such as #4610 with data tables. (For the record, I think adding a loading slot would be overkill)
I didn't expect the no-data slot to replace the loading text and maybe that's considered a bug or maybe it's as intended and should be added to the documentation so other people don't run into the same issue.
Seems like being able to add a loading-text property was suggested in #754 but it wasn't using the issue creator so it got closed. So I figured this was more along the lines of a feature request rather than a bug.
@nekosaur Vuetify has a loading-text prop already, I think this issue should be closed, what do you think?
cc. @johnleider
I've tested the following scenarios:
When a data table is loading...
When a data table has no data....
When a data table has both the loading and no-data prop or slot...
Most helpful comment
I've tested the following scenarios:
When a data table is loading...
When a data table has no data....
When a data table has both the loading and no-data prop or slot...
Confirmed & Closed. Good Job Everyone. 👍