Comment on page
Asynchronous Loading
Sometimes you may not have the data at hand immediately when the table is mounted, and instead you perform an API call to retrieve the data for the client table. In this case you can use the following pattern to notify the
VtNoResults
component that you are currently loading the data:async mounted() {
this.$refs.myTable.setLoadingState(true);
const {data} = await axios.get('api/data');
this.data = data;
this.$refs.myTable.setLoadingState(false);
}
Last modified 3yr ago