diff --git a/src/CAREUI/display/NetworkSignal.tsx b/src/CAREUI/display/NetworkSignal.tsx index 1d5f2d49623..91ce6b58b4c 100644 --- a/src/CAREUI/display/NetworkSignal.tsx +++ b/src/CAREUI/display/NetworkSignal.tsx @@ -26,7 +26,7 @@ export default function NetworkSignal({ strength, children }: Props) { strength === 3 && "text-primary-500", )} > -
- Gender: - - {abha?.gender} - -
- )} - {abha?.date_of_birth && ( -- DOB: - - {abha?.date_of_birth} - -
- )} - {abha?.email && ( -- Email: - - {abha?.email} - -
- )} -{name}
diff --git a/src/Components/Form/AutoCompleteAsync.tsx b/src/Components/Form/AutoCompleteAsync.tsx index b66cf16b800..b9caa512137 100644 --- a/src/Components/Form/AutoCompleteAsync.tsx +++ b/src/Components/Form/AutoCompleteAsync.tsx @@ -18,7 +18,7 @@ interface Props { onChange: (selected: any) => void; optionLabel?: (option: any) => string; optionLabelChip?: (option: any) => string; - showNOptions?: number; + showNOptions?: number | undefined; multiple?: boolean; compareBy?: string; debounceTime?: number; @@ -40,7 +40,7 @@ const AutoCompleteAsync = (props: Props) => { onChange, optionLabel = (option: any) => option.label, optionLabelChip = (option: any) => option.label, - showNOptions = 10, + showNOptions, multiple = false, compareBy, debounceTime = 300, @@ -62,8 +62,13 @@ const AutoCompleteAsync = (props: Props) => { () => debounce(async (query: string) => { setLoading(true); - const data = await fetchData(query); - setData(data?.slice(0, showNOptions) || []); + const data = (await fetchData(query)) || []; + + if (showNOptions !== undefined) { + setData(data.slice(0, showNOptions)); + } else { + setData(data); + } setLoading(false); }, debounceTime), [fetchData, showNOptions, debounceTime], @@ -102,7 +107,6 @@ const AutoCompleteAsync = (props: Props) => { onChange={({ target }) => setQuery(target.value)} onFocus={props.onFocus} onBlur={() => { - setQuery(""); props.onBlur?.(); }} autoComplete="off" diff --git a/src/Components/Form/FormFields/PhoneNumberFormField.tsx b/src/Components/Form/FormFields/PhoneNumberFormField.tsx index b2034507475..c580a15e409 100644 --- a/src/Components/Form/FormFields/PhoneNumberFormField.tsx +++ b/src/Components/Form/FormFields/PhoneNumberFormField.tsx @@ -7,6 +7,7 @@ import { formatPhoneNumber as formatPhoneNumberUtil, getCountryCode, CountryData, + humanizeStrings, } from "../../../Utils/utils"; import phoneCodesJson from "../../../Common/static/countryPhoneAndFlags.json"; import { @@ -14,8 +15,9 @@ import { PhoneNumberValidator, PhoneNumberType, } from "../FieldValidators"; -import CareIcon, { IconName } from "../../../CAREUI/icons/CareIcon"; +import CareIcon from "../../../CAREUI/icons/CareIcon"; import { Popover } from "@headlessui/react"; +import { useTranslation } from "react-i18next"; const phoneCodes: Record