Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

При ререндере почему то не отображается value, хотя если посмотреть по логам, оно есть. #130

Open
oxygenfront opened this issue May 5, 2023 · 1 comment

Comments

@oxygenfront
Copy link

image

так происходит только при ререндере компоненты

@oxygenfront
Copy link
Author

oxygenfront commented May 5, 2023

image

так происходит только при ререндере компоненты

const [regForm, setRegForm] = useState({
firstName: '',
lastName: '',
email: '',
newPassword: '',
confirmPassword: '',
birthdate: '',
country: '',
});
const updateForm = (e) => {
setRegForm({
...regForm,
[e.target.name]: e.target.value,
});
};
const handleAdress = (e) => {
setRegForm({ ...regForm, country: e.value });
};

<AddressSuggestions
className='register__wrapper-input second-page'
token='82173f834fc389954239d4414514d3ce2634ae1e'
onChange={(event) => {
handleAdress(event);
}}

            inputProps={{
              placeholder: 'Страна, город',
              value: regForm.country,
              onChange: (event) => {
                handleAdress(event);
              },
            }}
          />

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant