Skip to content

Commit f9d40db

Browse files
committed
Added the autocapitalize attribute support
1 parent 70767eb commit f9d40db

File tree

5 files changed

+7
-1
lines changed

5 files changed

+7
-1
lines changed

README.md

+1
Original file line numberDiff line numberDiff line change
@@ -141,6 +141,7 @@ Example with only bottom borders:
141141
| <b>`initialFocusField`</b> | number | - | The index of the input box for initial focusing. When the component will appear the focus will be placed on the input with this index. <br/> Note: If you need to dynamically hide the component it is needed to use <b>*ngIf</b> directive instead of the `[hidden]` attribute |
142142
| <b>`code`</b> | string / number | - | The input code value for the component. If the parameter contains non digits chars and `isCharsCode` is `false` the value will be <b>ignored</b> |
143143
| <b>`disabled`</b> | boolean | false | When `true` then the component will not handle user actions, like in regular html input element with the `disabled` attribute |
144+
| <b>`autocapitalize`</b> | string | - | The autocapitalize attribute is an enumerated attribute that controls whether and how text input is automatically capitalized as it is entered/edited by the user |
144145

145146
#### Events
146147

angular-code-input/README.md

+1
Original file line numberDiff line numberDiff line change
@@ -141,6 +141,7 @@ Example with only bottom borders:
141141
| <b>`initialFocusField`</b> | number | - | The index of the input box for initial focusing. When the component will appear the focus will be placed on the input with this index. <br/> Note: If you need to dynamically hide the component it is needed to use <b>*ngIf</b> directive instead of the `[hidden]` attribute |
142142
| <b>`code`</b> | string / number | - | The input code value for the component. If the parameter contains non digits chars and `isCharsCode` is `false` the value will be <b>ignored</b> |
143143
| <b>`disabled`</b> | boolean | false | When `true` then the component will not handle user actions, like in regular html input element with the `disabled` attribute |
144+
| <b>`autocapitalize`</b> | string | - | The autocapitalize attribute is an enumerated attribute that controls whether and how text input is automatically capitalized as it is entered/edited by the user |
144145

145146
#### Events
146147

angular-code-input/src/lib/code-input.component.config.ts

+3-1
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ export interface CodeInputComponentConfig {
1212
isFocusingOnLastByClickIfFilled?: boolean;
1313
code?: string | number;
1414
disabled?: boolean;
15+
autocapitalize?: string;
1516
}
1617

1718
export const defaultComponentConfig: CodeInputComponentConfig = {
@@ -23,5 +24,6 @@ export const defaultComponentConfig: CodeInputComponentConfig = {
2324
isPrevFocusableAfterClearing: true,
2425
isFocusingOnLastByClickIfFilled: false,
2526
code: undefined,
26-
disabled: false
27+
disabled: false,
28+
autocapitalize: undefined
2729
};

angular-code-input/src/lib/code-input.component.html

+1
Original file line numberDiff line numberDiff line change
@@ -7,5 +7,6 @@
77
(keydown)="onKeydown($event, i)"
88
[type]="inputType"
99
[disabled]="disabled"
10+
[attr.autocapitalize]="autocapitalize"
1011
autocomplete="one-time-code"/>
1112
</span>

angular-code-input/src/lib/code-input.component.ts

+1
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,7 @@ export class CodeInputComponent implements AfterViewInit, OnInit, OnChanges, Aft
4646
@Input() isFocusingOnLastByClickIfFilled !: boolean;
4747
@Input() code ?: string | number;
4848
@Input() disabled !: boolean;
49+
@Input() autocapitalize ?: string;
4950

5051
@Output() readonly codeChanged = new EventEmitter<string>();
5152
@Output() readonly codeCompleted = new EventEmitter<string>();

0 commit comments

Comments
 (0)