SiNumberInputComponent documentation¶
selector
si-number-input Common interface for form item controls. Controls that should be connected to SiFormItemComponent must implement this interface and must be provided using the SI_FORM_ITEM_CONTROL token.
Input Properties¶
| Name | Type | Default | Description |
|---|---|---|---|
| aria-label ¶ | TranslatableString | undefined | The aria-label passed to the input |
| disabled ¶ | boolean | false | Whether the input is disabled. |
| errormessageId ¶ | string | ${this.id()}-errormessage | This ID will be bound to the aria-describedby attribute of the number-input. Use this to reference the element containing the error message(s) for the number-input. It will be picked by the SiFormItemComponent if the number-input is used inside a form item. |
| inputId ¶ | string | __si-number-input-${SiNumberInputComponent.idCounter++} | ID that is set on the input, e.g. for <label for="..."> |
| max ¶ | number | undefined | The max. value for HTML input |
| min ¶ | number | undefined | The min. value for HTML input |
| placeholder ¶ | TranslatableString | The placeholder for input field. | |
| readonly ¶ | boolean | false | Whether the input can be focused but not edited. |
| showButtons ¶ | boolean | true | Show increment/decrement buttons? |
| step ¶ | (number | "any") | 1 | The step size for HTML input |
| unit ¶ | string | Optional unit label | |
| value ¶ | (number | null) | The value |
Output Properties¶
| Name | Type | Description |
|---|---|---|
| valueChange ¶ | (number | undefined) | Emits the current value when the user changes it. |
Attributes and Methods¶
| Name | Type | Default | Description |
|---|---|---|---|
| (readonly) id ¶ | Signal<string> | ... | The actual id of the control that should be used in the for attribute of a label. |
| (readonly) inputElement ¶ | Signal<ElementRef<HTMLInputElement>> | ... |
Types Documentation¶
| Variable |
|---|
| Represents a translatable string. This can either be a translation key, e.g. ACTIONS.EDIT that will be automatically translated when displayed on the UI or a pre-translated string, e.g. Edit . Equivalent to a normal string in usage and functionality. |
|---|
| Common interface for form item controls. Controls that should be connected to SiFormItemComponent must implement this interface and must be provided using the SI_FORM_ITEM_CONTROL token. | |||||
|---|---|---|---|---|---|
|
| | ||||
|---|---|---|---|---|
|
| Interface for form error mapper. It resolves a key to either a translatable string or function which is called with the validation error for its key and should return a translatable string. | |
|---|---|
| |
| Function The error mapper is used to resolve an angular validation error to a TranslatableString . It will be merged with already existing error mappers. | ||
|---|---|---|
|
| | ||||||
|---|---|---|---|---|---|---|
|
| | ||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| ||||||||||||||||||||||||||
| ||||||||||||||||||||||||||
| ||||||||||||||||||||||||||
|
| Deprecated: This component should no longer be used. When providing a form wide error mapper, use the provideFormValidationErrorMapper . When using the column layout, use the form-col-layout classes.For a custom breakpoint use the SCSS mixin: | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
| |||||||||||
| |||||||||||
| |||||||||||
|
| | ||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| ||||||||||||
| ||||||||||||
|
Except where otherwise noted, content on this site is licensed under MIT License.