title: Vue filters migration from vue 1 to vue 2
body: <p>I have problem with migratiing filters from vue 1 to vue 2, I created exactly what I need here (highlighting text which match the input text):</p>
  
  <pre><code>Vue.component('demo-grid', {
    template: '#grid-template',
    props: {
      filterKey: String
    },
    data: function () {
      return {
       searchParams: [
       { key: '' }
       ],
        suggestions: [
          { message: 'Foo' },
          { message: 'Bar' },
          { message: 'Foobar' },
          { message: 'pikachu' },
          { message: 'raichu' }
        ]
      }
    },
    filters: {
      highlight: function(words, query){
          var iQuery = new RegExp(query, "ig");
          return words.replace(iQuery, function(matchedTxt,a,b){
              return ('&lt;span class=\'highlight\'&gt;' + matchedTxt + '&lt;/span&gt;');
          });
      }
    }
  })
  
  
  // bootstrap the demo
  var demo = new Vue({
    el: '#demo'
  })
  </code></pre>
  
  <p><a href="https://jsfiddle.net/t5ac1quc/23/" rel="noreferrer">https://jsfiddle.net/t5ac1quc/23/</a> VUE-1 resource<br>
  <a href="https://jsfiddle.net/t5ac1quc/25/" rel="noreferrer">https://jsfiddle.net/t5ac1quc/25/</a> VUE-2 resource</p>
  
  <p>I would be very grateful, for all the answers</p>