Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

refactor(angular/input): inconsistently reading name from input with ngModel #1028

Merged
merged 1 commit into from
Jan 17, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions src/angular/input/input.ts
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,7 @@ const _SbbInputBase = mixinErrorState(
'[attr.id]': 'id',
'[disabled]': 'disabled',
'[required]': 'required',
'[attr.name]': 'name || null',
'[attr.readonly]': 'readonly && !_isNativeSelect || null',
// Only mark the input as invalid for assistive technology if it has a value since the
// state usually overlaps with `aria-required` when the input is empty and can be redundant.
Expand Down Expand Up @@ -143,6 +144,12 @@ export class SbbInput
*/
@Input() placeholder: string;

/**
* Name of the input.
* @docs-private
*/
@Input() name: string;

/**
* Implemented as part of SbbFormFieldControl.
* @docs-private
Expand Down