Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

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

Closed
c-martinez wants to merge 3 commits into json-schema-form:develop from c-martinez:develop

Conversation

Copy link

@c-martinez c-martinez commented Jan 12, 2016

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.

Copy link
Member

@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.

Copy link
Member

Ironically I actually submitted a bug report on this exact issue, but it was for someone else #18

Copy link
Author

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.

Copy link
Member

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.

Copy link
Author

@Anthropic -- how does this look ?

Copy link
Member

@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.

Copy link
Author

ah, cool -- perfect, that sorts it then. Look forward to version 1 then :-)

Anthropic reacted with thumbs up emoji

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Reviewers
No reviews
Assignees
No one assigned
Projects
None yet
Milestone
No milestone
Development

Successfully merging this pull request may close these issues.

AltStyle によって変換されたページ (->オリジナル) /