Skip to content

Number input never renders the placeholder #144

@havelock

Description

@havelock

It seems impossible to see the placeholder for the <Number /> input element.

Whenever initialValue/defaultValue props are passed 0, null, undefined or even "" values the value="0" HTML attribute is always rendered.

The only solution for displaying the placeholder is passing value="" prop, but obviously the prop doesn't use the built-in onChange handling then and becomes non-editable.

<Number
  name="somename"
  placeholder={"Test placeholder"}
/>

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