Skip to content

Commit

Permalink
feat: infinite loop when using setSelectedCountry (#89)
Browse files Browse the repository at this point in the history
  • Loading branch information
trinhthinh388 authored Mar 6, 2024
1 parent 676a596 commit 2c1bd30
Show file tree
Hide file tree
Showing 6 changed files with 18 additions and 5 deletions.
2 changes: 1 addition & 1 deletion apps/docs/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
"clean": "rimraf .turbo && rimraf node_modules && rimraf .next"
},
"dependencies": {
"@react-awesome/components": "1.0.16",
"@react-awesome/components": "1.0.17",
"classnames": "^2.5.1",
"lodash": "^4.17.21",
"lucide-react": "^0.315.0",
Expand Down
7 changes: 7 additions & 0 deletions packages/components/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,12 @@
# @react-awesome/components

## 1.0.17

### Patch Changes

- Updated dependencies
- @react-awesome/phone-input@1.1.5

## 1.0.16

### Patch Changes
Expand Down
4 changes: 2 additions & 2 deletions packages/components/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@react-awesome/components",
"version": "1.0.16",
"version": "1.0.17",
"main": "./dist/index.cjs",
"module": "./dist/index.js",
"types": "./dist/index.d.ts",
Expand Down Expand Up @@ -39,7 +39,7 @@
"access": "public"
},
"dependencies": {
"@react-awesome/phone-input": "1.1.4",
"@react-awesome/phone-input": "1.1.5",
"@react-awesome/use-click-outside": "0.0.3",
"@react-awesome/use-preserve-input-caret-position": "0.0.3",
"@react-awesome/use-selection-range": "0.0.3",
Expand Down
6 changes: 6 additions & 0 deletions packages/phone-input/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
# @react-awesome/phone-input

## 1.1.5

### Patch Changes

- infinite loop when set country via setSelectedCountry

## 1.1.4

### Patch Changes
Expand Down
2 changes: 1 addition & 1 deletion packages/phone-input/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@react-awesome/phone-input",
"version": "1.1.4",
"version": "1.1.5",
"main": "./dist/index.cjs",
"module": "./dist/index.js",
"types": "./dist/index.d.ts",
Expand Down
2 changes: 1 addition & 1 deletion packages/phone-input/src/hooks/usePhoneInput.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -224,8 +224,8 @@ export const usePhoneInput = ({
)
const setSelectedCountry = React.useCallback(
(country: CountryCode) => {
const metadata = generateMetadata('')
currentCountryCodeRef.current = country
const metadata = generateMetadata('')
onPhoneChange(undefined, metadata)
setInnerValue('')
closeCountrySelect()
Expand Down

0 comments on commit 2c1bd30

Please sign in to comment.