From 71392356c33b4d5f818daef2ce6071ad313e44fb Mon Sep 17 00:00:00 2001 From: chuccv Date: Thu, 5 May 2022 16:55:46 +0700 Subject: [PATCH 1/2] [Compatible] -- applyBindings after submit ajax. --- view/frontend/web/js/action/submit-filter.js | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/view/frontend/web/js/action/submit-filter.js b/view/frontend/web/js/action/submit-filter.js index 00f4b2b..bfb35c7 100644 --- a/view/frontend/web/js/action/submit-filter.js +++ b/view/frontend/web/js/action/submit-filter.js @@ -23,13 +23,14 @@ define( 'jquery', 'mage/storage', 'Mageplaza_AjaxLayer/js/model/loader', - 'mage/apply/main' + 'mage/apply/main', + 'ko' ], - function ($, storage, loader, mage) { + function ($, storage, loader, mage, ko) { 'use strict'; - var productContainer = $('#layer-product-list'), - layerContainer = $('.layered-filter-block-container'), + var productContainer = $('#layer-product-list'), + layerContainer = $('.layered-filter-block-container'), quickViewContainer = $('#mpquickview-popup'); return function (submitUrl, isChangeUrl, method) { @@ -77,6 +78,9 @@ define( quickViewContainer.html(response.quickview); } + ko.cleanNode(productContainer[0]); + productContainer.applyBindings(); + if (mage) { mage.apply(); } From 64e9df57aaff35eb6872a0db8506a75d2695249d Mon Sep 17 00:00:00 2001 From: Brian Date: Mon, 30 May 2022 11:39:17 +0700 Subject: [PATCH 2/2] Clean code --- composer.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/composer.json b/composer.json index bf7a661..61c871b 100644 --- a/composer.json +++ b/composer.json @@ -2,10 +2,10 @@ "name": "mageplaza/module-ajax-layered-navigation", "description": "Magento 2 Ajax Layered Navigation Extension", "require": { - "mageplaza/module-core": "^1.4.5" + "mageplaza/module-core": "^1.4.12" }, "type": "magento2-module", - "version": "4.0.4", + "version": "4.0.5", "license": "proprietary", "authors": [ {