diff --git a/docusaurus/package.json b/docusaurus/package.json index a72e4ae21..cc50969b3 100644 --- a/docusaurus/package.json +++ b/docusaurus/package.json @@ -40,4 +40,4 @@ "trailingComma": "es5", "tabWidth": 2 } -} \ No newline at end of file +} diff --git a/packages/analytics/package.json b/packages/analytics/package.json index ccf78b7f5..0989276e6 100644 --- a/packages/analytics/package.json +++ b/packages/analytics/package.json @@ -38,4 +38,4 @@ "publishConfig": { "access": "public" } -} \ No newline at end of file +} diff --git a/packages/app-icon/package.json b/packages/app-icon/package.json index 96c10322d..65013a24b 100644 --- a/packages/app-icon/package.json +++ b/packages/app-icon/package.json @@ -46,4 +46,4 @@ "publishConfig": { "access": "public" } -} \ No newline at end of file +} diff --git a/packages/authorize/package.json b/packages/authorize/package.json index 544228e28..84526e06c 100644 --- a/packages/authorize/package.json +++ b/packages/authorize/package.json @@ -53,4 +53,4 @@ "publishConfig": { "access": "public" } -} \ No newline at end of file +} diff --git a/packages/avatar/package.json b/packages/avatar/package.json index 00464d704..4ef123e1d 100644 --- a/packages/avatar/package.json +++ b/packages/avatar/package.json @@ -45,4 +45,4 @@ "publishConfig": { "access": "public" } -} \ No newline at end of file +} diff --git a/packages/badge/package.json b/packages/badge/package.json index 136f836d2..206e559eb 100644 --- a/packages/badge/package.json +++ b/packages/badge/package.json @@ -49,4 +49,4 @@ "publishConfig": { "access": "public" } -} \ No newline at end of file +} diff --git a/packages/breadcrumbs/package.json b/packages/breadcrumbs/package.json index 13956b2fe..0ecdc626f 100644 --- a/packages/breadcrumbs/package.json +++ b/packages/breadcrumbs/package.json @@ -39,4 +39,4 @@ "publishConfig": { "access": "public" } -} \ No newline at end of file +} diff --git a/packages/button/package.json b/packages/button/package.json index 8141aaf64..53c120e78 100644 --- a/packages/button/package.json +++ b/packages/button/package.json @@ -48,4 +48,4 @@ "publishConfig": { "access": "public" } -} \ No newline at end of file +} diff --git a/packages/date/package.json b/packages/date/package.json index c12f0ce00..309be64f8 100644 --- a/packages/date/package.json +++ b/packages/date/package.json @@ -59,4 +59,4 @@ "publishConfig": { "access": "public" } -} \ No newline at end of file +} diff --git a/packages/favorites/package.json b/packages/favorites/package.json index 8026bc0d6..eb9be010b 100644 --- a/packages/favorites/package.json +++ b/packages/favorites/package.json @@ -58,4 +58,4 @@ "publishConfig": { "access": "public" } -} \ No newline at end of file +} diff --git a/packages/feature/package.json b/packages/feature/package.json index ebc7ab81b..1b3b5bc32 100644 --- a/packages/feature/package.json +++ b/packages/feature/package.json @@ -46,4 +46,4 @@ "publishConfig": { "access": "public" } -} \ No newline at end of file +} diff --git a/packages/feedback/package.json b/packages/feedback/package.json index 8dee7c67b..4233bef69 100644 --- a/packages/feedback/package.json +++ b/packages/feedback/package.json @@ -52,4 +52,4 @@ "publishConfig": { "access": "public" } -} \ No newline at end of file +} diff --git a/packages/form-upload/package.json b/packages/form-upload/package.json index 0f54b2380..bc48b02dc 100644 --- a/packages/form-upload/package.json +++ b/packages/form-upload/package.json @@ -57,4 +57,4 @@ "publishConfig": { "access": "public" } -} \ No newline at end of file +} diff --git a/packages/form/package.json b/packages/form/package.json index 846e7b114..947814a03 100644 --- a/packages/form/package.json +++ b/packages/form/package.json @@ -1,6 +1,6 @@ { "name": "@availity/form", - "version": "1.4.1-alpha.0", + "version": "1.4.1", "description": "Form Wrapper around formik using reactstrap components", "keywords": [ "react", diff --git a/packages/form/tests/CurrencyInput.test.js b/packages/form/tests/CurrencyInput.test.js index 4ca64ad5c..77c0853a7 100644 --- a/packages/form/tests/CurrencyInput.test.js +++ b/packages/form/tests/CurrencyInput.test.js @@ -79,6 +79,32 @@ describe('CurrencyInput', () => { }); }); + test('should format decimals on blur', async () => { + const { container } = render( +
{ + console.log('submitted'); + }} + initialValues={{}} + > + <> + + + + + ); + + const currencyInput = container.querySelector('input'); + + fireEvent.focus(currencyInput); + + expect(currencyInput.value).toEqual('1'); + + fireEvent.blur(currencyInput); + + expect(currencyInput.value).toEqual('$1.11'); + }); + test('should use id when passed in', () => { const { container } = render(