title: How to load component after a tab is clicked on Vue JS with Bootstrap Vue?
body: <p>I have the following code in HTML (coded with Vue JS &amp; Bootstrap):</p>
  
  <pre><code>&lt;b-tabs card&gt;
          &lt;b-tab title="Followers" :title-link-class="'tab-title-class'"&gt;
                Page View graph here
          &lt;/b-tab&gt;
          &lt;b-tab title="Orders" :title-link-class="'tab-title-class'"&gt;
                Order Numbers graph here
          &lt;/b-tab&gt;
          &lt;b-tab title="Sales" :title-link-class="'tab-title-class'"&gt;
                &lt;sales-analytics&gt;&lt;/sales-analytics&gt;
          &lt;/b-tab&gt;
          &lt;b-tab title="Profit" :title-link-class="'tab-title-class'"&gt;
                Earning graph here
          &lt;/b-tab&gt;
  &lt;/b-tabs&gt;
  </code></pre>
  
  <p>The card contains 4 tabs, one of which is titled "Sales", and <code>&lt;sales-analytics&gt;&lt;/sales-analytics&gt;</code> is a component I created to render a graph with Vue-ApexCharts library. However, the graph does not render automatically when the tab is selected. It can only run after I clicked F12 on Chrome, reloading the page does not work either. </p>
  
  <p>I am thinking that the component should only run after the tab has been selected, rather than run altogether when the site is loaded (as this causes render problem when the tab is not selected when the site loads). Does anyone know how to implement this? Or an alternative way to solve this issue?</p>
  
  <p>More stuff from the script section:</p>
  
  <pre><code>&lt;script&gt;
     import Sales from '../analytics/Sales'
  
  export default {
      components: {      
          'sales-analytics': Sales
  }
  &lt;/script&gt;
  </code></pre>
  
  <p>EDIT:
  After quite a bit of Googling, I found this: <a href="https://github.com/apertureless/vue-chartjs/issues/157" rel="noreferrer">https://github.com/apertureless/vue-chartjs/issues/157</a>
  Which has a very similar behaviour to my situation, I want to v-if and mounted to load the component after the tab is selected. Anyone know how to do it?</p>