Revert "refactor: use paragon Autosuggest field for country field (#897)" (#900)

This reverts commit 3c89afea4a.
This commit is contained in:
Syed Sajjad Hussain Shah
2023-05-12 13:01:22 +05:00
committed by GitHub
parent 3c89afea4a
commit f0105f0094
6 changed files with 170 additions and 56 deletions

View File

@@ -54,13 +54,13 @@ const ConfigurableRegistrationForm = (props) => {
});
const handleOnChange = (event, countryValue = null) => {
const { name } = event.target;
const { name, type } = event.target;
let value;
if (countryValue) {
value = { ...countryValue };
} else {
value = event.target.type === 'checkbox' ? event.target.checked : event.target.value;
if (event.target.type === 'checkbox') {
if (type === 'checkbox') {
setFieldErrors(prevErrors => ({ ...prevErrors, [name]: '' }));
}
}