gd-bs 6.9.4 → 6.9.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -125,14 +125,14 @@ var _Pagination = /** @class */ (function (_super) {
125
125
  if (item.classList.contains("disabled")) {
126
126
  return;
127
127
  }
128
- // Update the active page
129
- isPrevious_1 ? _this._activePage-- : _this._activePage++;
130
128
  // See if we are rendering the default
131
129
  if (_this._showDefault) {
132
- // Click the item
133
- (_a = _this._items[_this._activePage - 1]) === null || _a === void 0 ? void 0 : _a.click();
130
+ // Click the previous/next item
131
+ (_a = _this._items[isPrevious_1 ? _this._activePage - 2 : _this._activePage]) === null || _a === void 0 ? void 0 : _a.click();
134
132
  }
135
133
  else {
134
+ // Update the active page
135
+ isPrevious_1 ? _this._activePage-- : _this._activePage++;
136
136
  // Render the active buttons
137
137
  _this.renderActivePageNumbers(itemTemplate);
138
138
  // Call the click event
@@ -212,8 +212,6 @@ var _Pagination = /** @class */ (function (_super) {
212
212
  item.addEventListener("click", function (ev) {
213
213
  // Prevent the page from moving to the top
214
214
  ev.preventDefault();
215
- // Set the active index
216
- _this._activePage = pageNumber_1;
217
215
  // See if we are showing the default
218
216
  if (_this._showDefault) {
219
217
  // Clear the active item
@@ -225,6 +223,8 @@ var _Pagination = /** @class */ (function (_super) {
225
223
  var span_1 = activeItem.querySelector("span");
226
224
  span_1 ? span_1.parentNode.removeChild(span_1) : null;
227
225
  }
226
+ // Set the active index
227
+ _this._activePage = pageNumber_1;
228
228
  // Show the active item
229
229
  _this._items[_this._activePage - 1].classList.add("active");
230
230
  // Add the span
@@ -236,6 +236,8 @@ var _Pagination = /** @class */ (function (_super) {
236
236
  _this.configureDefaultButtons();
237
237
  }
238
238
  else {
239
+ // Set the active index
240
+ _this._activePage = pageNumber_1;
239
241
  // Render the active buttons
240
242
  _this.renderActivePageNumbers(itemTemplate);
241
243
  }