Skip to content

Commit ef93d1a

Browse files
committed
Updated taxonomy filtering so pagingation is reset to first page after selecting a filter
1 parent f9ba23b commit ef93d1a

File tree

4 files changed

+15
-4
lines changed

4 files changed

+15
-4
lines changed

dist/assets/js/plugins/storeLocator/jquery.storelocator.js

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
/*! jQuery Google Maps Store Locator - v2.7.5 - 2018-02-09
1+
/*! jQuery Google Maps Store Locator - v2.7.5 - 2018-02-11
22
* http://www.bjornblog.com/web/jquery-store-locator-plugin
33
* Copyright (c) 2018 Bjorn Holine; Licensed MIT */
44

@@ -1894,6 +1894,11 @@
18941894

18951895
var filterVal, filterContainer, filterKey;
18961896

1897+
// Reset pagination.
1898+
if (_this.settings.pagination === true) {
1899+
_this.paginationChange(0);
1900+
}
1901+
18971902
// Handle checkbox filters
18981903
if ($(this).is('input[type="checkbox"]')) {
18991904
// First check for existing selections

dist/assets/js/plugins/storeLocator/jquery.storelocator.min.js

Lines changed: 3 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

readme.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,7 @@ filtering.
4747
* Fixed issue with pagination page numbers displaying after no results via PR from [heldr88](https://github.com/heldr88)
4848
* Fixed issue with taxonomy filtering and autoGeocode setting where HTML Geocoding API would run on every filter change.
4949
* Swapped the default location data type to be JSON instead of XML.
50+
* Updated taxonomy filtering so pagingation is reset to first page after selecting a filter.
5051

5152
### Version 2.7.4
5253

src/js/jquery.storelocator.js

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1890,6 +1890,11 @@
18901890

18911891
var filterVal, filterContainer, filterKey;
18921892

1893+
// Reset pagination.
1894+
if (_this.settings.pagination === true) {
1895+
_this.paginationChange(0);
1896+
}
1897+
18931898
// Handle checkbox filters
18941899
if ($(this).is('input[type="checkbox"]')) {
18951900
// First check for existing selections

0 commit comments

Comments
 (0)