@availity/feedback 7.1.3 → 7.1.4

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
@@ -2,6 +2,15 @@
2
2
 
3
3
  This file was generated using [@jscutlery/semver](https://github.com/jscutlery/semver).
4
4
 
5
+ ## [7.1.4](https://github.com/Availity/availity-react/compare/@availity/feedback@7.1.3...@availity/feedback@7.1.4) (2023-04-18)
6
+
7
+
8
+ ### Bug Fixes
9
+
10
+ * **feedback:** disable button on submit to avoid log spam ([#1269](https://github.com/Availity/availity-react/issues/1269)) ([5cfc7b5](https://github.com/Availity/availity-react/commit/5cfc7b5be9de5d8e3705adef1374a1858c30a7cd))
11
+
12
+
13
+
5
14
  ## [7.1.3](https://github.com/Availity/availity-react/compare/@availity/feedback@7.1.2...@availity/feedback@7.1.3) (2022-12-01)
6
15
 
7
16
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@availity/feedback",
3
- "version": "7.1.3",
3
+ "version": "7.1.4",
4
4
  "description": "Availity feedback with smiley faces react component.",
5
5
  "keywords": [
6
6
  "react",
@@ -25,11 +25,11 @@
25
25
  "publish:canary": "yarn npm publish --access public --tag canary"
26
26
  },
27
27
  "dependencies": {
28
- "@availity/form": "1.7.1",
29
- "@availity/hooks": "3.3.1",
30
- "@availity/icon": "0.11.1",
28
+ "@availity/form": "1.7.2",
29
+ "@availity/hooks": "3.3.3",
30
+ "@availity/icon": "0.11.3",
31
31
  "@availity/native-form": "^5.0.1",
32
- "@availity/select": "3.3.2",
32
+ "@availity/select": "3.5.0",
33
33
  "prop-types": "^15.8.1"
34
34
  },
35
35
  "devDependencies": {
@@ -45,8 +45,10 @@ const FeedbackForm = ({
45
45
  }) => {
46
46
  const [active, setActive] = useState(null);
47
47
  const [sent, setSent] = useState(null);
48
+ const [loading, setLoading] = useState(null);
48
49
  const ref = useRef();
49
50
  const sendFeedback = async ({ smileField, ...values }) => {
51
+ setLoading(true);
50
52
  const response = await avRegionsApi.getCurrentRegion();
51
53
 
52
54
  await analytics.info({
@@ -62,6 +64,7 @@ const FeedbackForm = ({
62
64
  });
63
65
 
64
66
  setSent(values);
67
+ setLoading(false);
65
68
  };
66
69
 
67
70
  // Close the Modal once sent after 2 seconds
@@ -238,7 +241,7 @@ const FeedbackForm = ({
238
241
  }}
239
242
  type="submit"
240
243
  color="primary"
241
- disabled={!active}
244
+ disabled={Boolean(!active || loading)}
242
245
  >
243
246
  Send Feedback
244
247
  </Button>