title: Sortable list of components
body: <p>I've made my filters section using vue.js. I inject all the components through ajax and they response dynamically to those filters. Components in my case represent cars, they have price, marks, etc...</p>
  
  <p>Now I'd like to add two more filters that allow me to sort them by some field (price, for instance). I've been reading and it's quite easy to sort lists specifying a field and a order...</p>
  
  <p>How should I proceed to create that list and so, being able to sort it.</p>
  
  <p><a href="https://jsfiddle.net/ejvz8enq/3/" rel="nofollow noreferrer">Here</a> I made a little fiddle, very simple, in which I'd to sort the cars by prize once I click the filter.</p>
  
  <pre><code>var Car = Vue.extend({
  
      template: '#template_box_car',
      props: {
  
          show: {
          default: true
          },
  
          code: {
          default: ""
          },
  
          prize: {
          default: 0
          },
  
          description: {
          default: "No comment"
          }
      }
  });
  //register component
  Vue.component('box_car',Car);
  
  //create a root instance
  var vm = new Vue({
      el: 'body',
  
      methods: {
  
          sortBy: function(field, order){
  
          }
     }
  });
  </code></pre>