catamphetamine / react-phone-number-input

React component for international phone number input

Home Page:http://catamphetamine.gitlab.io/react-phone-number-input/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

can disable only the flag selector?

neduardoaguirre opened this issue · comments

I am trying to implement this library to manage my phone inputs and I would like to be able to disable only the flag selector. I saw that the readOnly property disables the selector and the input. Is there any way to disable only the flag selector?

Thanks for the quick reply, in fact I need to make the flag selector visible but avoid displaying the list, that would be very useful.

Then you'd have to implement your own custom component. This component won't support that for now.

commented

Hi there!

I've been using your React phone number input package, and it's been incredibly helpful for my project. However, I've noticed a small issue with the 'ReadOnly' property.

When 'ReadOnly' is set to true, the phone number input becomes non-editable as expected. However, the flag selector dropdown remains active and functional, allowing users to change the country code. It seems like the flag selector should also be disabled when the phone number input is read-only for a more consistent user experience.

It would be great if you could consider adding an option to disable the flag selector along with the phone number input when 'ReadOnly' is set to true. This enhancement would ensure a more consistent and user-friendly behavior when users are not allowed to edit the phone number.

Thanks for your excellent work on this package, and I look forward to seeing this improvement in a future update!

@lazardimi That's an interesting Idea. Thx. Implemented your suggestion in react-phone-number-input@3.3.7.

commented

Thanks again for your hard work and for being so responsive to user feedback!