react-international-phone
Advanced tools
Changelog
4.0.0 (2023-10-22)
allow type prefix if input is empty (08e5811)
CountrySelector: add library prefix to country selector list-item id (b45af25)
CountrySelector: fix country name overflow (09e7097)
fix dynamic format mask with disableDialCodeAndPrefix (5cb1e11)
forceDialCode: fix e164Phone value update when input is cleared (0c353e0)
getCursorPosition: reuse isNumeric utility function (65d8618)
getCursorPosition: update cursor position logic, fix cursor jump on disabled dial code values (5256439)
guess initial country when dial code is disabled (c79adc3)
handlePhoneChange: return current country on partial dial code match (dbbf20d)
history: ignore history events on empty input (9c781c1)
ignore input handling if user typed non digit character (b175b4e)
PhoneInput: make ref inherit inner input-ref (819b48d)
PhoneInput: rename formattedValue to displayValue in onChange metadata arg (3479ae5)
PhoneInput: support ref forwarding (f2d3de8)
rename displayValue to inputValue in onChange callback (e78a13e)
rename getCountryCurrentFormat to getCountryMaskFormat, add it to export (fca84d4)
rename getCountryMaskFormat helper function to getActiveFormattingMask (aec5e9e)
return country object instead of iso2 code from usePhoneInput and onChange (17c1365)
usePhoneInput: fix e164Phone value on setCountry (cec0700)
usePhoneInput: log error if an invalid country code is passed to setNewCountry (6098a99)
fix!: rename flag image component to FlagImage (c4b0abd)
fix(usePhoneInput)!: rename return property names (42e4ef2)
fix!: return E164 phone in onChange callback (939275a)
feat!: add support for multiple masks per country (f758bb3)