Skip to content

Commit

Permalink
Merge pull request Expensify#48435 from abzokhattab/change-address-st…
Browse files Browse the repository at this point in the history
…ate-to-use-value

Change address state to use value instead of default value
  • Loading branch information
techievivek authored Sep 5, 2024
2 parents fd16fdd + 8fe414c commit 35d31f3
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/components/AddressForm.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ import useLocalize from '@hooks/useLocalize';
import useThemeStyles from '@hooks/useThemeStyles';
import * as ErrorUtils from '@libs/ErrorUtils';
import * as ValidationUtils from '@libs/ValidationUtils';
import CONST from '@src/CONST';
import type {Country} from '@src/CONST';
import CONST from '@src/CONST';
import type ONYXKEYS from '@src/ONYXKEYS';
import INPUT_IDS from '@src/types/form/HomeAddressForm';
import type {Errors} from '@src/types/onyx/OnyxCommon';
Expand All @@ -14,6 +14,7 @@ import CountrySelector from './CountrySelector';
import FormProvider from './Form/FormProvider';
import InputWrapper from './Form/InputWrapper';
import type {FormOnyxValues} from './Form/types';
import type {State} from './StateSelector';
import StateSelector from './StateSelector';
import TextInput from './TextInput';

Expand Down Expand Up @@ -192,7 +193,7 @@ function AddressForm({
<InputWrapper
InputComponent={StateSelector}
inputID={INPUT_IDS.STATE}
defaultValue={state}
value={state as State}
onValueChange={onAddressChanged}
shouldSaveDraft={shouldSaveDraft}
/>
Expand Down

0 comments on commit 35d31f3

Please sign in to comment.