Skip to content

Commit 64c4350

Browse files
authored
feat: added default country code & ui bump (#2804)
* feat: added default country code & ui bump * fix: refactor
1 parent 24188fd commit 64c4350

File tree

4 files changed

+8
-4
lines changed

4 files changed

+8
-4
lines changed

apps/kyb-app/CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,7 @@
6767
### Patch Changes
6868

6969
- Updated dependencies
70+
- @ballerine/ui@0.5.40
7071
- @ballerine/common@0.9.44
7172
- @ballerine/workflow-browser-sdk@0.6.56
7273

packages/ui/CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@
2424

2525
### Patch Changes
2626

27+
- Added defaultCountry code for phone input
2728
- bump
2829
- Updated dependencies
2930
- @ballerine/common@0.9.45

packages/ui/src/components/organisms/DynamicForm/components/RSJVInputAdaters/PhoneInputAdapter/PhoneInputAdapter.tsx

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,17 +7,19 @@ export const PhoneInputAdapter: RJSFInputAdapter = ({
77
formData,
88
disabled,
99
testId,
10+
uiSchema,
1011
onChange,
1112
onBlur,
1213
}) => {
14+
const { defaultCountry = 'us' } = uiSchema || {};
15+
1316
const handleBlur = useCallback(() => {
14-
// @ts-ignore
15-
onBlur && onBlur(id, formData);
17+
onBlur?.(id as string, formData);
1618
}, [id, onBlur, formData]);
1719

1820
return (
1921
<PhoneNumberInput
20-
country="us"
22+
country={defaultCountry}
2123
value={formData}
2224
disabled={disabled}
2325
enableSearch

0 commit comments

Comments
 (0)