Skip to content

Input type="number", when initial value is "0" or 0, and value changes to empty string "", value does not update #9884

Closed

Description

@brendon-codes

Example of bug here:
https://jsfiddle.net/69z2wepo/80380/

My best guess is that maybe React is doing some truthiness checking which thinks that 0 is the same as "", so it is not updating the value of the component.

Activity

  1. changed the title [-]Input type="number", when initial value is `"0"` or `0`, and value changes to empty string "", value does not update properly[/-] [+]Input type="number", when initial value is `"0"` or `0`, and value changes to empty string "", value does not update[/+] on Jun 7, 2017
  2. aweary commented on Jun 7, 2017

    @aweary
    Contributor

    Thanks for the report @brendoncrawford!

    I believe this will be resolved by #9714

  3. gaearon commented on Jul 11, 2017

    @gaearon
    Collaborator

    This was fixed in #9714 and no longer reproduces.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions