From fe087f8bda8b12006e2b8672e5f6f619c167c707 Mon Sep 17 00:00:00 2001 From: dukenv0307 Date: Sun, 24 Sep 2023 22:05:37 +0700 Subject: [PATCH] fix: 28034 --- src/components/CountryPicker/index.js | 4 +++- src/components/StatePicker/index.js | 4 +++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/src/components/CountryPicker/index.js b/src/components/CountryPicker/index.js index c838ed8f4060..8f5c89b1bce8 100644 --- a/src/components/CountryPicker/index.js +++ b/src/components/CountryPicker/index.js @@ -43,7 +43,9 @@ function CountryPicker({value, errorText, onInputChange, forwardedRef}) { }; const updateCountryInput = (country) => { - onInputChange(country.value); + if (country.value !== value) { + onInputChange(country.value); + } hidePickerModal(); }; diff --git a/src/components/StatePicker/index.js b/src/components/StatePicker/index.js index 142654b82cd1..f7f894af2a07 100644 --- a/src/components/StatePicker/index.js +++ b/src/components/StatePicker/index.js @@ -49,7 +49,9 @@ function StatePicker({value, errorText, onInputChange, forwardedRef, label}) { }; const updateStateInput = (state) => { - onInputChange(state.value); + if (state.value !== value) { + onInputChange(state.value); + } hidePickerModal(); };