@instructure/ui-pagination 10.2.3-snapshot-10 → 10.2.3-snapshot-13

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.
package/CHANGELOG.md CHANGED
@@ -3,9 +3,12 @@
3
3
  All notable changes to this project will be documented in this file.
4
4
  See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
5
5
 
6
- ## [10.2.3-snapshot-10](https://github.com/instructure/instructure-ui/compare/v10.2.2...v10.2.3-snapshot-10) (2024-10-01)
6
+ ## [10.2.3-snapshot-13](https://github.com/instructure/instructure-ui/compare/v10.2.2...v10.2.3-snapshot-13) (2024-10-02)
7
7
 
8
- **Note:** Version bump only for package @instructure/ui-pagination
8
+
9
+ ### Bug Fixes
10
+
11
+ * **ui-pagination:** fix pagination with numberinput when onBlur it calls onPage change every time, even where there are no changes ([38e75c4](https://github.com/instructure/instructure-ui/commit/38e75c4f610455128d0c3d19181a14823e150f4f))
9
12
 
10
13
 
11
14
 
@@ -69,7 +69,9 @@ let PaginationPageInput = (_dec = withStyle(generateStyle, generateComponentThem
69
69
  this.setNewPage(event, Math.floor(this.currentPage + 1));
70
70
  };
71
71
  this.handleBlur = event => {
72
- this.setNewPage(event, Math.round(this.state.number));
72
+ if (Math.round(this.state.number) !== this.currentPage) {
73
+ this.setNewPage(event, Math.round(this.state.number));
74
+ }
73
75
  };
74
76
  this.state = this.initialState;
75
77
  }
@@ -76,7 +76,9 @@ let PaginationPageInput = exports.PaginationPageInput = (_dec = (0, _emotion.wit
76
76
  this.setNewPage(event, Math.floor(this.currentPage + 1));
77
77
  };
78
78
  this.handleBlur = event => {
79
- this.setNewPage(event, Math.round(this.state.number));
79
+ if (Math.round(this.state.number) !== this.currentPage) {
80
+ this.setNewPage(event, Math.round(this.state.number));
81
+ }
80
82
  };
81
83
  this.state = this.initialState;
82
84
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@instructure/ui-pagination",
3
- "version": "10.2.3-snapshot-10",
3
+ "version": "10.2.3-snapshot-13",
4
4
  "description": "A UI component library made by Instructure Inc.",
5
5
  "author": "Instructure, Inc. Engineering and Product Design",
6
6
  "module": "./es/index.js",
@@ -23,9 +23,9 @@
23
23
  },
24
24
  "license": "MIT",
25
25
  "devDependencies": {
26
- "@instructure/ui-axe-check": "10.2.3-snapshot-10",
27
- "@instructure/ui-babel-preset": "10.2.3-snapshot-10",
28
- "@instructure/ui-test-utils": "10.2.3-snapshot-10",
26
+ "@instructure/ui-axe-check": "10.2.3-snapshot-13",
27
+ "@instructure/ui-babel-preset": "10.2.3-snapshot-13",
28
+ "@instructure/ui-test-utils": "10.2.3-snapshot-13",
29
29
  "@testing-library/jest-dom": "^6.4.6",
30
30
  "@testing-library/react": "^15.0.7",
31
31
  "@testing-library/user-event": "^14.5.2",
@@ -33,23 +33,23 @@
33
33
  },
34
34
  "dependencies": {
35
35
  "@babel/runtime": "^7.24.5",
36
- "@instructure/emotion": "10.2.3-snapshot-10",
37
- "@instructure/shared-types": "10.2.3-snapshot-10",
38
- "@instructure/ui-a11y-content": "10.2.3-snapshot-10",
39
- "@instructure/ui-a11y-utils": "10.2.3-snapshot-10",
40
- "@instructure/ui-buttons": "10.2.3-snapshot-10",
41
- "@instructure/ui-dom-utils": "10.2.3-snapshot-10",
42
- "@instructure/ui-icons": "10.2.3-snapshot-10",
43
- "@instructure/ui-number-input": "10.2.3-snapshot-10",
44
- "@instructure/ui-portal": "10.2.3-snapshot-10",
45
- "@instructure/ui-prop-types": "10.2.3-snapshot-10",
46
- "@instructure/ui-react-utils": "10.2.3-snapshot-10",
47
- "@instructure/ui-testable": "10.2.3-snapshot-10",
48
- "@instructure/ui-themes": "10.2.3-snapshot-10",
49
- "@instructure/ui-tooltip": "10.2.3-snapshot-10",
50
- "@instructure/ui-utils": "10.2.3-snapshot-10",
51
- "@instructure/ui-view": "10.2.3-snapshot-10",
52
- "@instructure/uid": "10.2.3-snapshot-10",
36
+ "@instructure/emotion": "10.2.3-snapshot-13",
37
+ "@instructure/shared-types": "10.2.3-snapshot-13",
38
+ "@instructure/ui-a11y-content": "10.2.3-snapshot-13",
39
+ "@instructure/ui-a11y-utils": "10.2.3-snapshot-13",
40
+ "@instructure/ui-buttons": "10.2.3-snapshot-13",
41
+ "@instructure/ui-dom-utils": "10.2.3-snapshot-13",
42
+ "@instructure/ui-icons": "10.2.3-snapshot-13",
43
+ "@instructure/ui-number-input": "10.2.3-snapshot-13",
44
+ "@instructure/ui-portal": "10.2.3-snapshot-13",
45
+ "@instructure/ui-prop-types": "10.2.3-snapshot-13",
46
+ "@instructure/ui-react-utils": "10.2.3-snapshot-13",
47
+ "@instructure/ui-testable": "10.2.3-snapshot-13",
48
+ "@instructure/ui-themes": "10.2.3-snapshot-13",
49
+ "@instructure/ui-tooltip": "10.2.3-snapshot-13",
50
+ "@instructure/ui-utils": "10.2.3-snapshot-13",
51
+ "@instructure/ui-view": "10.2.3-snapshot-13",
52
+ "@instructure/uid": "10.2.3-snapshot-13",
53
53
  "prop-types": "^15.8.1"
54
54
  },
55
55
  "peerDependencies": {
@@ -164,7 +164,9 @@ class PaginationPageInput extends Component<
164
164
  }
165
165
 
166
166
  handleBlur = (event: React.FocusEvent<HTMLInputElement>) => {
167
- this.setNewPage(event, Math.round(this.state.number))
167
+ if (Math.round(this.state.number) !== this.currentPage) {
168
+ this.setNewPage(event, Math.round(this.state.number))
169
+ }
168
170
  }
169
171
 
170
172
  getNumberWithinRange(n: number) {