Vue3-datatables
  • Dependencies & Compatability
  • Getting Started
  • Client Table
    • Asynchronous Loading
    • Grouping
    • Filtering Algorithm
    • Editable Cells
  • Server Table
    • Implementations
    • Custom Request Function
    • Setting Multiple Request Parameters
    • Error Message
    • Draw Counter
  • Dependencies & Compatability
  • Getting Started
  • Virtual Pagination
  • Column Templates
  • Nested Data Structures
  • Selectable Rows
  • List Filters
  • Custom Template
  • Custom Filters
  • Multiple Sorting
  • Date Columns
  • Custom Sorting
  • Conditional Cell Styling
  • Columns Visibility
  • Child Rows
  • Properties
  • Slots
  • Methods
  • Events
Powered by GitBook
On this page
  1. Client Table

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);
}
PreviousClient TableNextGrouping

Last updated 1 year ago