@sikka/hawa 0.31.17-next → 0.32.0-next

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -2048,12 +2048,14 @@ var Select = ({
2048
2048
  var PhoneInput = ({
2049
2049
  labelProps,
2050
2050
  inputProps,
2051
+ countryCodes,
2051
2052
  ...props
2052
2053
  }) => {
2053
2054
  const [phoneNumber, setPhoneNumber] = useState("");
2054
2055
  const [countryCode, setCountryCode] = useState(props.preferredCountry);
2055
2056
  const inputRef = useRef(null);
2056
2057
  const handleInputChange = (e) => {
2058
+ console.log("test e ", e.target.value);
2057
2059
  const validChars = /^[0-9-()]+$/;
2058
2060
  const input = e.target.value;
2059
2061
  if (input === "" || validChars.test(input)) {
@@ -2076,7 +2078,7 @@ var PhoneInput = ({
2076
2078
  isSearchable: true,
2077
2079
  isClearable: false,
2078
2080
  placeholder: "Code",
2079
- options: countries_default,
2081
+ options: countryCodes || countries_default,
2080
2082
  onChange: setCountryCode,
2081
2083
  value: countryCode == null ? void 0 : countryCode.label,
2082
2084
  defaultValue: props.preferredCountry