-
Notifications
You must be signed in to change notification settings - Fork 133
Platform: Step Input Component Technical Design
Kevin Okamoto edited this page Feb 19, 2020
·
4 revisions
The StepInput is an input element used for entering numbers. It has a text input which only accepts numbers and increment buttons ("+" and "-") to either side of input field.
<fdp-step-input
[(ngModel)]="count"
[minValue]="0"
[maxValue]="100"
[precision]="0"
[minimumErrorMessage]=""
[maximumErrorMessage]=""
[step]="1"></fdp-step-input>
The minimum value the StepInput can be set to.
The maximum value the StepInput can be set to.
Numerical precision of numbers allowed in StepInput. This not only sets the display for input, but restricts the user from entering values beyond set precision.
The increment the value is increased or decreased when the StepInput increment buttons are clicked.
- The subtract increment button should be disabled when the value reaches the minimum value; the add increment button should be disabled when the value is at the maximum.
- The StepInput should show an error when the input is beyond bounds set by minimum and/or maximum values.
- The StepInput should not allow characters other than numbers and decimals. e.g 3, 1.2 (or 1,2 for localized).
- The StepInput should not allow user to input numbers which go beyond precision. Example: If the precision is set to "0" only integer values should be allowed, if the precission is set to "2" only numbers to the hundreths decimal are allowed.