I am using the config object to filter and change the page to a page number stored in sessionStorage when the user clicks on a link in the filtered results and then hits the back button to return to the same filtered results and page, but randomly when returning to the filtered results something is firing and causing mixitup to re-filter on the "all" value instead of the value stored in sessionStorage.
var mixer = mixitup(container, {
pagination: {
limit: 9 // impose a limit of 9 targets per page
},
load: {
filter: localFilter,
page:localPage
},
callbacks: {
onMixEnd: () => {
let currentFilter = $(selectFilter).val();
sessionStorage.setItem('currentFilter', currentFilter);
let currentPage = mixer.getState().activePagination.page;
sessionStorage.setItem('currentPage', currentPage);
}
}
});
I am using the config object to filter and change the page to a page number stored in sessionStorage when the user clicks on a link in the filtered results and then hits the back button to return to the same filtered results and page, but randomly when returning to the filtered results something is firing and causing mixitup to re-filter on the "all" value instead of the value stored in sessionStorage.
var mixer = mixitup(container, {