diff --git a/development/src/AntDemo.tsx b/development/src/AntDemo.tsx index 472d780..f22de94 100644 --- a/development/src/AntDemo.tsx +++ b/development/src/AntDemo.tsx @@ -48,7 +48,11 @@ const AntDemo = () => { )}
- setValue(e as any)}/> + setValue(e as any)} + /> diff --git a/development/src/MuiDemo.tsx b/development/src/MuiDemo.tsx index 4dcc6c6..2e54b96 100644 --- a/development/src/MuiDemo.tsx +++ b/development/src/MuiDemo.tsx @@ -32,6 +32,7 @@ const Demo = () => { )} e.preventDefault()}> } + label={<> +
+ {enableArrow && ( + + + + + + )} + } children={
{countries[name]} {displayFormat(mask)} @@ -233,7 +245,7 @@ const PhoneInput = forwardRef(({ ) })} - ), [selectValue, query, disabled, disableParentheses, disableDropdown, onDropdownVisibleChange, minWidth, searchNotFound, countries, countriesList, setFieldValue, setValue, prefixCls, enableSearch, searchPlaceholder]) + ), [selectValue, query, enableArrow, disabled, disableParentheses, disableDropdown, onDropdownVisibleChange, minWidth, searchNotFound, countries, countriesList, setFieldValue, setValue, prefixCls, enableSearch, searchPlaceholder]) return (
country?: string; + enableArrow?: boolean; + enableSearch?: boolean; searchNotFound?: string; diff --git a/development/src/mui-phone/index.tsx b/development/src/mui-phone/index.tsx index bd25731..41195c1 100644 --- a/development/src/mui-phone/index.tsx +++ b/development/src/mui-phone/index.tsx @@ -27,6 +27,7 @@ const PhoneInput = forwardRef(({ searchVariant = undefined, country = getDefaultISO2Code(), disabled = false, + enableArrow = false, enableSearch = false, disableDropdown = false, disableParentheses = false, @@ -198,10 +199,21 @@ const PhoneInput = forwardRef(({ startAdornment: ( setOpen(!open)} >
+ {enableArrow && ( + + + + )} ) diff --git a/development/src/mui-phone/types.ts b/development/src/mui-phone/types.ts index f264409..c48c3a4 100644 --- a/development/src/mui-phone/types.ts +++ b/development/src/mui-phone/types.ts @@ -13,6 +13,8 @@ export interface PhoneInputProps extends Omit { country?: string; + enableArrow?: boolean; + enableSearch?: boolean; searchNotFound?: string;