title: How I filter data from an input using vue/vuex?
body: <p>I would like to know how through an input how I can filter data that comes from a computed property.</p>
  
  <p>My problem comes from property computed dataFiltered () where a getter is returned but it has a string as parameter.</p>
  
  <p>I would like that through an input when writing a word the information is filtered.</p>
  
  <p><strong>Home.vue</strong></p>
  
  <pre><code>  &lt;/template&gt;
       &lt;input type="text" :v-model="search" class="form-control" id="search" placeholder="Search..."/&gt;
        &lt;div&gt;
          &lt;ul v-for="item in dataFiltered" :key="item.id"&gt;
           &lt;li&gt;{{item}}&lt;/li&gt;
         &lt;/ul&gt;
       &lt;/div&gt;
   &lt;/template&gt;
  
    &lt;script&gt;
       import {ACTYPE} from '../store/types/actions_types';
       import {mapState , mapGetters} from 'vuex';
  
       export default {
          name: 'home',
          created(){
          this.$store.dispatch(ACTYPE.GET_MOVIES);
       },
      data(){
        return{
          search: ''
        }
      },
      computed: {
        ...mapState(['topMovies' , 'loading']),
        ...mapGetters(['filterData']),
  
        dataFiltered(){
          // parameter harcored
          return this.filterData("Sp")
        }
      },
     }
    &lt;/script&gt;
  </code></pre>
  
  <p><strong>store/getters.js</strong></p>
  
  <pre><code>export const getters = {
    TopMovies: (state) =&gt;{
      return state.topMovies.map(data =&gt;{
        return data
    });
   },
  
  filterData: (state) =&gt; (search) =&gt;{
    let query = new RegExp(search , 'i');
    console.log(query);
    //return state.topMovies.filter(data =&gt; data.name === query);    
    return state.topMovies.filter(data =&gt;{      
      return data.name.toLowerCase().includes(search.toLowerCase())
    })
   },
  };
  </code></pre>