title: Vue computed Filter combining with Ordering
body: <p>I have the following computed function so filter my houses based on a search input field. This works.</p>
  
  <pre><code>computed: {
      filtered: function() {
          var self = this;
          let searchTerm = (this.search || "").toLowerCase()
          if(this.houses) {
              return this.houses.filter(function(item) {
                let city = (item.city || "").toLowerCase()
                let street = (item.street || "").toLowerCase()
                return city.indexOf(searchTerm) &gt; -1 || street.indexOf(searchTerm) &gt; -1;
              })
          }
        }
    }
  </code></pre>
  
  <p>But how to implement ordering on City and Street also? Both asc and desc.</p>
  
  <p>This is the table:</p>
  
  <pre><code>&lt;input type="search" v-model="search" placeholder="Search for City OR Street" /&gt;
  &lt;table&gt;
      &lt;thead&gt;
          &lt;tr&gt;
              &lt;th @click="sortByStreet()"&gt;Street&lt;/th&gt;
              &lt;th @click="sortByCity()"&gt;City&lt;/th&gt;
          &lt;/tr&gt;
      &lt;/thead&gt;
      &lt;tbody&gt;
          &lt;tr v-for="house in filtered"&gt;
              &lt;td&gt;{{ house.street }}&lt;/td&gt;
              &lt;td&gt;{{ house.city }}&lt;/td&gt;
          &lt;/tr&gt;
      &lt;/tbody&gt;
  &lt;/table&gt;
  </code></pre>
  
  <p>How to fix it with the functions <code>sortByStreet()</code> and <code>sortByCity()</code>? Combined with the filter. </p>