-
Notifications
You must be signed in to change notification settings - Fork 84
Add min max and step for <input type="number" #12
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
Conversation
@c-martinez thanks for the PR, sorry it took so long I hadn't been watching this repo well enough, ideally this would have to use the new builder which makes adding the values quite easy when needed while leaving them off if they are not required. An example of which is in the Material Decorator. If you can update to mimic that there is a greater chance I can accept it. It would also be really ehlpful as I personally don't use this decorator.
Ironically I actually submitted a bug report on this exact issue, but it was for someone else #18
Hi @Anthropic -- I'm not sure to understand what do you mean by the new builder -- do you mean gulp build ? Just want to be sure what I am looking for on the Material Decorator before start making changes.
In the documentation there is reference made to the new builder, basically when you look at the material decorator js file you can see a bunch of functions that modify the template fragments before they get injected into the page using pure javascript.
@Anthropic -- how does this look ?
@c-martinez I just added this to the Angular Schema Form repo for you! Like moments ago. The function needed to take into account minimum, exclusiveMinimum, maximum, exclusiveMaximum and multipleOf rather than min, max and step.
You can see it here: https://github.com/json-schema-form/angular-schema-form/blob/b5977219a14e2de148b2f8b12197a32b3b7977d8/src/services/builder.js#L162
So it will be in version 1, just can't promise the timeline just yet.
ah, cool -- perfect, that sorts it then. Look forward to version 1 then :-)
Angular input type number already provides this functionality, so why not use it? This of course may be redundant with validators, but validators can do 'more complex' types of validations -- this only prevents scroller from rolling outside given range.