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

Was this helpful?

  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 4 years ago

Was this helpful?