Here is how I have structured my view:
<div class="row">
<div class="col-md-3">
<search-filter-view ...></search-filter-view>
</div>
<div class="col-md-9">
<search-result-view ...></search-result-view>
</div>
</div>
This is my search-filter-view component:
<script>
export default{
props:[...],
data(){
return{
...
}
},
methods:{
filterBySort: function (sort){
this.sort = sort
...
}
}
}
</script>
This is my search-result-view component:
<script>
export default {
props:[...],
data() {
return {
...
}
},
methods: {
getVueItems: function(page) {
...
}
}
}
</script>
I am trying to pass the value of the sort parameter (from the filterBySort method in component one) to the getVueItems method (in component two).
Any suggestions on how I can achieve this?