@workday/canvas-kit-react 8.3.1 → 8.3.2

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.
@@ -9,7 +9,7 @@ export declare const useGoToForm: ({ onSubmit, model }?: UseGoToFormConfig) => {
9
9
  onSubmit: (event: React.FormEvent<HTMLFormElement>) => void;
10
10
  };
11
11
  inputProps: {
12
- value: number | undefined;
12
+ value: number;
13
13
  onChange: (event: React.ChangeEvent<HTMLInputElement>) => void;
14
14
  };
15
15
  };
@@ -23,7 +23,7 @@ exports.useGoToForm = void 0;
23
23
  var React = __importStar(require("react"));
24
24
  var useGoToForm = function (_a) {
25
25
  var _b = _a === void 0 ? {} : _a, onSubmit = _b.onSubmit, model = _b.model;
26
- var _c = React.useState(), value = _c[0], setValue = _c[1];
26
+ var _c = React.useState(model.state.currentPage), value = _c[0], setValue = _c[1];
27
27
  React.useEffect(function () {
28
28
  if (value !== undefined && model.state.currentPage !== value) {
29
29
  setValue(model.state.currentPage);
@@ -9,7 +9,7 @@ export declare const useGoToForm: ({ onSubmit, model }?: UseGoToFormConfig) => {
9
9
  onSubmit: (event: React.FormEvent<HTMLFormElement>) => void;
10
10
  };
11
11
  inputProps: {
12
- value: number | undefined;
12
+ value: number;
13
13
  onChange: (event: React.ChangeEvent<HTMLInputElement>) => void;
14
14
  };
15
15
  };
@@ -1,7 +1,7 @@
1
1
  import * as React from 'react';
2
2
  export var useGoToForm = function (_a) {
3
3
  var _b = _a === void 0 ? {} : _a, onSubmit = _b.onSubmit, model = _b.model;
4
- var _c = React.useState(), value = _c[0], setValue = _c[1];
4
+ var _c = React.useState(model.state.currentPage), value = _c[0], setValue = _c[1];
5
5
  React.useEffect(function () {
6
6
  if (value !== undefined && model.state.currentPage !== value) {
7
7
  setValue(model.state.currentPage);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@workday/canvas-kit-react",
3
- "version": "8.3.1",
3
+ "version": "8.3.2",
4
4
  "description": "The parent module that contains all Workday Canvas Kit React components",
5
5
  "author": "Workday, Inc. (https://www.workday.com)",
6
6
  "license": "Apache-2.0",
@@ -49,7 +49,7 @@
49
49
  "@emotion/styled": "^11.6.0",
50
50
  "@popperjs/core": "^2.5.4",
51
51
  "@workday/canvas-colors-web": "^2.0.0",
52
- "@workday/canvas-kit-popup-stack": "^8.3.1",
52
+ "@workday/canvas-kit-popup-stack": "^8.3.2",
53
53
  "@workday/canvas-system-icons-web": "^3.0.0",
54
54
  "@workday/design-assets-types": "^0.2.8",
55
55
  "chroma-js": "^2.1.0",
@@ -67,5 +67,5 @@
67
67
  "@workday/canvas-accent-icons-web": "^3.0.0",
68
68
  "@workday/canvas-applet-icons-web": "^2.0.0"
69
69
  },
70
- "gitHead": "3f4b9c5a6126ca28372a01670df3ccc899584243"
70
+ "gitHead": "6166515cdc130418f404429b74d44c4901c17b8b"
71
71
  }
@@ -8,7 +8,7 @@ export interface UseGoToFormConfig {
8
8
  }
9
9
 
10
10
  export const useGoToForm = ({onSubmit, model}: UseGoToFormConfig = {} as UseGoToFormConfig) => {
11
- const [value, setValue] = React.useState<number>();
11
+ const [value, setValue] = React.useState<number>(model.state.currentPage);
12
12
 
13
13
  React.useEffect(() => {
14
14
  if (value !== undefined && model.state.currentPage !== value) {