Answers for "b-table loading"

0

b-table loading

// BoostrapVue b-table set loader when fetching data

<template>
  <div>
    <b-table :items="items">
      <template #table-busy>
        <div class="text-center text-danger my-2">
          <b-spinner class="align-middle"></b-spinner>
          <strong>Loading...</strong>
        </div>
      </template>
    </b-table>
  </div>
</template>

<script>
  export default {
    data() {
      return {
        isBusy: false,
        items: [
         ....
        ]
      }
    },
    methods: {
      toggleBusy() {
        this.isBusy = !this.isBusy
      }
    }
  }
</script>
Posted by: Guest on September-08-2021

Browse Popular Code Answers by Language