Skip to content
Snippets Groups Projects
Commit 405bc9f9 authored by P. FONTANET's avatar P. FONTANET
Browse files

fix(input): placeholder (tout en minuscule)

parent 86a61674
No related branches found
No related tags found
No related merge requests found
......@@ -5,6 +5,7 @@
- feat(input): événement `patternValueChange` si un `pattern` est défini et que la valeur change
- feat(skiplinks): ajout `DsfrAnchorLink#route` & ajout de l'output `linkSelect`
- fix(input): la valeur `ariaExpanded` à false n'est pas valorisée
- fix(input): `placeHolder` déprécié en faveur de `placeholder`
- doc(input): commentaires sur les propriétés d'accessibilité revus
- chore: export des mixins sass
- chore: migration angular 16
......
......@@ -44,6 +44,7 @@ ou _slots_ (`<ng-content />`). Description des colonnes :
| FormInput | 1.1 | propriété | `dsfr-input` | `dsfr-form-input` | 1.1 |
| FormInput | 1.2 | propriété | `width` | | 2.0 |
| FormInput | 1.2 | propriété | `textarea` | `type` | 2.0 |
| FormInput | 1.11 | propriété | `placeHolder` | `placeholder` | 2.0 |
| FormPassword | 1.5 | propriété | `id` | `inputId` | 2.0 |
| FormRadio | 1.5 | propriété | `id` | `inputId` | 2.0 |
| FormRadio | 1.1 | propriété | `dsfr-radio` | `dsfr-form-radio` | 1.1 |
......
......@@ -83,7 +83,7 @@ export abstract class BaseInputComponent extends DefaultControlComponent<string>
/**
* Placeholder de l'input.
*/
@Input() placeHolder: string;
@Input() placeholder: string;
/**
* Attribut min de l'input.
......@@ -163,17 +163,28 @@ export abstract class BaseInputComponent extends DefaultControlComponent<string>
return this._type;
}
/** @deprecated since 1.11.0 use placeholder instead (all lowercase) */
get placeHolder(): string {
return this.placeholder;
}
/**
* Type de l'input, 'text' par défaut.
*/
@Input() set type(value: DsfrInputType) {
this._type = value;
this.inputMode = <DsfrInputMode>INPUT_TYPE_TO_MODE[this._type] || undefined;
// TODO 2.0 A Supprimer le pattern par défaut
if (this._type === DsfrInputTypeConst.NUMBER && !this.pattern) {
this.pattern = '[0-9]*';
}
}
/** @deprecated since 1.11.0 use placeholder instead (all lowercase) */
set placeHolder(value: string) {
this.placeholder = value;
}
/**
* À l'écoute de la valeur afin d'émettre un événement dans le cas où on a un pattern.
*/
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment