Skip to content

[number-field] Step property should not have default value #1224

Closed

Description

@pekam

Motivation

Currently, <vaadin-number-field> has step=1 by default. The default value has special functionality: it is used only for increment/decrement, but not for validation. This is quite weird and has caused some issues. See discussion in vaadin/vaadin-text-field#420 and vaadin/vaadin-text-field#421.

Actually, the native <input type="number"> validates as step would be 1, even when the property is not defined.

We can choose to either keep the current functionality (not validating by step by default), or align with the native element and do validate. Either way, having a default property value makes no sense.

Note

Part of #3102

Activity

  1. changed the title [-]Step should not have default value[/-] [+][text-field] Step of number-field should not have default value[/+] on May 28, 2021
  2. changed the title [-][text-field] Step of number-field should not have default value[/-] [+][number-field] Step property should not have default value[/+] on Nov 24, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions