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

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

Closed
pekam opened this issue Oct 28, 2019 · 0 comments
Closed

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

pekam opened this issue Oct 28, 2019 · 0 comments
Labels
refactor Internal improvement requires new major This would be a breaking change vaadin-number-field

Comments

@pekam
Copy link
Contributor

pekam commented Oct 28, 2019

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

@vaadin-bot vaadin-bot transferred this issue from vaadin/vaadin-text-field May 19, 2021
@vaadin-bot vaadin-bot added refactor Internal improvement requires new major This would be a breaking change vaadin-text-field labels May 19, 2021
@web-padawan web-padawan changed the title Step should not have default value [text-field] Step of number-field should not have default value May 28, 2021
@web-padawan web-padawan changed the title [text-field] Step of number-field should not have default value [number-field] Step property should not have default value Nov 24, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
refactor Internal improvement requires new major This would be a breaking change vaadin-number-field
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants