Skip to content

Commit d88b8fd

Browse files
Merge pull request #616 from dxc-technology/fix-597
[Minor] Added new prop autocomplete on inputs components
2 parents 35aff98 + 50b51fe commit d88b8fd

File tree

15 files changed

+90
-17
lines changed

15 files changed

+90
-17
lines changed

projects/dxc-ngx-cdk-site/src/app/components/examples/date-input/date-properties/date-properties.component.html

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -126,4 +126,15 @@
126126
</td>
127127
<td>Value of the tabindex attribute.</td>
128128
</tr>
129+
<tr>
130+
<td>autocomplete: string</td>
131+
<td><code>'off'</code></td>
132+
<td>
133+
HTML autocomplete attribute. Lets the user specify if any permission the
134+
user agent has to provide automated assistance in filling out the input
135+
value. Its value must be one of all the possible values of the HTML
136+
autocomplete attribute: 'on', 'off', 'email', 'username', 'new-password',
137+
...
138+
</td>
139+
</tr>
129140
</dxc-table>

projects/dxc-ngx-cdk-site/src/app/components/examples/number-input/number-properties/number-properties.component.html

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -86,8 +86,8 @@
8686
<td>onChange: EventEmitter</td>
8787
<td></td>
8888
<td>
89-
This function will be called when the user types within the number. An object
90-
including the new value and the error will be passed to this
89+
This function will be called when the user types within the number. An
90+
object including the new value and the error will be passed to this
9191
function. An example of this object is:
9292
{{ "{" }}
9393
<code>value: value, error: error</code>
@@ -132,4 +132,15 @@
132132
</td>
133133
<td>Value of the tabindex attribute.</td>
134134
</tr>
135+
<tr>
136+
<td>autocomplete: string</td>
137+
<td><code>'off'</code></td>
138+
<td>
139+
HTML autocomplete attribute. Lets the user specify if any permission the
140+
user agent has to provide automated assistance in filling out the input
141+
value. Its value must be one of all the possible values of the HTML
142+
autocomplete attribute: 'on', 'off', 'email', 'username', 'new-password',
143+
...
144+
</td>
145+
</tr>
135146
</dxc-table>

projects/dxc-ngx-cdk-site/src/app/components/examples/password-input/password-properties/password-properties.component.html

Lines changed: 20 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,8 @@
1414
<td>value: string</td>
1515
<td></td>
1616
<td>
17-
Value of the input element. If undefined, the component will be uncontrolled
18-
and the value will be managed internally by the component.
17+
Value of the input element. If undefined, the component will be
18+
uncontrolled and the value will be managed internally by the component.
1919
</td>
2020
</tr>
2121
<tr>
@@ -56,10 +56,10 @@
5656
<td>onChange: EventEmitter</td>
5757
<td></td>
5858
<td>
59-
This function will be called when the user types within the input
60-
element of the component. An
61-
object including the value and the error (if the value entered is not
62-
valid) will be passed to this function. An example of this object is:
59+
This function will be called when the user types within the input element
60+
of the component. An object including the value and the error (if the
61+
value entered is not valid) will be passed to this function. An example of
62+
this object is:
6363
{{ "{" }} <code>value: value, error: error</code>{{ "}" }}. If there is no
6464
error, error will be null.
6565
</td>
@@ -68,9 +68,9 @@
6868
<td>onBlur: EventEmitter</td>
6969
<td></td>
7070
<td>
71-
This function will be called when the input element loses the focus. An object
72-
including the value and the error (if the value entered is not valid) will
73-
be passed to this function. An example of this object is:
71+
This function will be called when the input element loses the focus. An
72+
object including the value and the error (if the value entered is not
73+
valid) will be passed to this function. An example of this object is:
7474
{{ "{" }}
7575
<code>value: value, error: error</code>
7676
{{ "}" }}. If there is no error, error will be null.
@@ -128,4 +128,15 @@
128128
</td>
129129
<td>Value of the tabindex attribute.</td>
130130
</tr>
131+
<tr>
132+
<td>autocomplete: string</td>
133+
<td><code>'off'</code></td>
134+
<td>
135+
HTML autocomplete attribute. Lets the user specify if any permission the
136+
user agent has to provide automated assistance in filling out the input
137+
value. Its value must be one of all the possible values of the HTML
138+
autocomplete attribute: 'on', 'off', 'email', 'username', 'new-password',
139+
...
140+
</td>
141+
</tr>
131142
</dxc-table>

projects/dxc-ngx-cdk-site/src/app/components/examples/text-input/text-input-properties/text-input-properties.component.html

Lines changed: 13 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -51,17 +51,16 @@
5151
<td></td>
5252
<td>
5353
If it is defined, the component will change its appearance, showing the
54-
error below the input component. If it is not defined, the error messages will be created and managed internally.
54+
error below the input component. If it is not defined, the error messages
55+
will be created and managed internally.
5556
</td>
5657
</tr>
5758
<tr>
5859
<td>clearable: boolean</td>
5960
<td>
6061
<code>false</code>
6162
</td>
62-
<td>
63-
If true, the input will have an action to clear the entered value.
64-
</td>
63+
<td>If true, the input will have an action to clear the entered value.</td>
6564
</tr>
6665
<tr>
6766
<td>optional: boolean</td>
@@ -120,6 +119,16 @@
120119
will be null.
121120
</td>
122121
</tr>
122+
<tr>
123+
<td>autocomplete: string</td>
124+
<td><code>'off'</code></td>
125+
<td>
126+
HTML autocomplete attribute. Lets the user specify if any permission the
127+
user agent has to provide automated assistance in filling out the input
128+
value. Its value must be one of all the possible values of the HTML
129+
autocomplete attribute. Please check the documentation <dxc-link href="https://developer.mozilla.org/en-US/docs/Web/HTML/Attributes/autocomplete" text="here"></dxc-link>.
130+
</td>
131+
</tr>
123132
<tr>
124133
<td>length: object</td>
125134
<td></td>

projects/dxc-ngx-cdk-site/src/app/components/examples/textarea/textarea-properties/textarea-properties.component.html

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -95,8 +95,8 @@
9595
<td>onChange: EventEmitter</td>
9696
<td></td>
9797
<td>
98-
This function will be called when the user types within the textarea. An object
99-
including the new value and the error will be passed to this
98+
This function will be called when the user types within the textarea. An
99+
object including the new value and the error will be passed to this
100100
function. An example of this object is:
101101
{{ "{" }}
102102
<code>value: value, error: error</code>
@@ -167,4 +167,15 @@
167167
</td>
168168
<td>Value of the tabindex attribute.</td>
169169
</tr>
170+
<tr>
171+
<td>autocomplete: string</td>
172+
<td><code>'off'</code></td>
173+
<td>
174+
HTML autocomplete attribute. Lets the user specify if any permission the
175+
user agent has to provide automated assistance in filling out the textarea
176+
value. Its value must be one of all the possible values of the HTML
177+
autocomplete attribute: 'on', 'off', 'email', 'username', 'new-password',
178+
...
179+
</td>
180+
</tr>
170181
</dxc-table>

projects/dxc-ngx-cdk/src/lib/dxc-date-input/dxc-date-input.component.html

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@
2121
[mdePopoverOffsetX]="popOverOffsetX"
2222
[mdePopoverPositionX]="'before'"
2323
[tabIndex]="tabIndex"
24+
[autocomplete]="autocomplete"
2425
>
2526
<dxc-text-input-action>
2627
<svg

projects/dxc-ngx-cdk/src/lib/dxc-date-input/dxc-date-input.component.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -98,6 +98,9 @@ export class DxcDateInputComponent implements OnInit {
9898
@Input()
9999
tabIndex: number;
100100

101+
@Input()
102+
autocomplete: string = "off";
103+
101104
defaultInputs = new BehaviorSubject<any>({
102105
error: "",
103106
clearable: false,

projects/dxc-ngx-cdk/src/lib/dxc-number-input/dxc-number-input.component.html

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212
[tabIndex]="tabIndex"
1313
[disabled]="disabled"
1414
[optional]="optional"
15+
[autocomplete]="autocomplete"
1516
>
1617
<ng-content select="dxc-text-input-suffix" ngProjectAs="dxc-text-input-suffix"></ng-content>
1718
<ng-content select="dxc-text-input-prefix" ngProjectAs="dxc-text-input-prefix"></ng-content>

projects/dxc-ngx-cdk/src/lib/dxc-number-input/dxc-number-input.component.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -101,6 +101,9 @@ export class DxcNumberInputComponent implements OnInit, OnChanges, OnDestroy {
101101
@Input()
102102
size: string = "medium";
103103

104+
@Input()
105+
autocomplete: string = "off";
106+
104107
private controlled: boolean;
105108

106109
defaultInputs = new BehaviorSubject<any>({

projects/dxc-ngx-cdk/src/lib/dxc-password-input/dxc-password-input.component.html

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313
(onBlur)="handleOnBlur($event)"
1414
(onActionClick)="handleMaskPassword()"
1515
[tabIndex]="tabIndex"
16+
[autocomplete]="autocomplete"
1617
>
1718
<dxc-text-input-action>
1819
<svg

0 commit comments

Comments
 (0)