Does anyone have any idea why adding this.$emit('update:page', 1);
doesn’t work on beta, but does it work on locale?
Page from index.blade.php
goes to @include('public.components.filters.filter', ['liveLoad' => true, 'isFilterPage' => true])
, and from there to <sort>
via :page.sync="page"
is further changed using this.$emit('update:page', 1);
index.blade.php
has page variable:
......
@include('public.components.filters.filter', ['liveLoad' => true, 'isFilterPage' => true])
......
filter.blade.php
has vue template component:
.........
<div class="controls__item controls__item_sort">
<sort
:page.sync="page"
:sort_direction.sync="sort_direction"
:sort_type.sync="sort_type"
:sorts="filterSettings.sorts"
:type-sale="typeSale"
></sort>
</div>
.........
sort.vue
:
name: "sort",
props: ['sort_direction', 'sort_type', 'sorts', 'typeSale', 'page'],
data() {
return {
title: undefined,
tests: {},
}
},
methods: {
..........
changeSorts(direction, type, title) {
this.title = title;
this.$emit('update:sort_direction', direction);
this.$emit('update:sort_type', type);
console.log(this.page);
this.$emit('update:page', 1);
console.log(this.page);
this.close();
},
I cleaned the cache, updated the browser via ctrl+f5
. Also enabled/disabled cache in the browser.
Миша Калачев is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.