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

numeric inputs coersed to string (min, max, step, etc.) #8943

Closed
yankeeinlondon opened this issue Dec 21, 2017 · 3 comments
Closed

numeric inputs coersed to string (min, max, step, etc.) #8943

yankeeinlondon opened this issue Dec 21, 2017 · 3 comments

Comments

@yankeeinlondon
Copy link

This is a design question ... I find it unnecessarily verbose to require that you add numeric data properties and bind them to the numeric inputs on much of the API surface. In many cases parameters like min, max, etc. are going to be static values and it would be far nicer if you could just state them in the template like so:

 <el-input-number min=0>

I get that native DOM variables are always strings but why not just have these numerics coerced to a number from a string and if NAN presents than throw a user-friendly error message?

@element-bot
Copy link
Member

Hello, this issue has been closed because it does not conform to our issue requirements. Please submit issues with issue-generator. More info can be found in #3693.

@yankeeinlondon
Copy link
Author

I guess the easiest shorthand at the moment is:

<el-input-number :min="Number(0)">

@yankeeinlondon
Copy link
Author

Your issue generator is not appropriate for design related questions

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants