Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Change Number input type to text instead of number #9757

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Commits on Apr 5, 2024

  1. Change Number input type to text instead of number

    There are multiple problems when it comes to number input e.g. there is empty input ref value when inputted value is not a number. So, in the context you will have null but on UI you'll still see value with overlaying label.
    For more limitations you can read following article.
    https://technology.blog.gov.uk/2020/02/24/why-the-gov-uk-design-system-team-changed-the-input-type-for-numbers/
    vlzuiev committed Apr 5, 2024
    Configuration menu
    Copy the full SHA
    1a3a071 View commit details
    Browse the repository at this point in the history

Commits on Apr 6, 2024

  1. reset number input ref value when event value is empty

    when inserting incorrect number value the input state is set to null.
    However, input ref still has incorrect value and causes input label to overlay value which is still shown.
    vlzuiev committed Apr 6, 2024
    Configuration menu
    Copy the full SHA
    36d6224 View commit details
    Browse the repository at this point in the history