You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I used MUI to wrap this package. And it's a required field. When I press submit if shows required filed error, that's okay. But when I press any character like 'a' or any it does not displays it. But it only removes the required error. When I type a character again it shows up.
I used MUI to wrap this package. And it's a required field. When I press submit if shows required filed error, that's okay. But when I press any character like 'a' or any it does not displays it. But it only removes the required error. When I type a character again it shows up.
<PlacesAutocomplete
searchOptions={{
types: ["(regions)"],
componentRestrictions: { country: "us" },
}}
value={zipCode}
ref={(ref) => (canvasRef = ref)}
onChange={setZipCode}
onSelect={handleSelect}
>
{({
getInputProps,
suggestions,
getSuggestionItemProps,
loading,
}) => (
<TextField
{...getInputProps()}
disabled={
window.location.href.includes("review-form")
? true
: patientForm["updateEditButtonForNewPatient"]
? false
: patientForm["updateEditButtonExistingPatient"]
? true
: false
}
label={_resources.PatientInformation.ZIP}
variant="outlined"
size="small"
InputLabelProps={{ shrink: true }}
className={
"loc-input zip-input" +
(formData.zip === null && onSubmitFlag
? " zip-error"
: "")
}
name="zipCode"
id="location-input"
inputRef={register({
required: _resources.PatientInformation.ZIP_REQUIRED,
})}
error={Boolean(
formData.zip !== null ? null : errors.zipCode
)}
helperText={
formData.zip !== null ? null : errors.zipCode?.message
}
/>
The text was updated successfully, but these errors were encountered: