Skip to content

Commit cde2e36

Browse files
crisbetoandrewseguin
authored andcommitted
refactor(input): mirror placeholder in data attribute
This is a prerequisite to make landing #10466 easier in g3. Mirrors the native placeholder value in a data attribute so that we can read it even when it has been removed.
1 parent 3a7e93c commit cde2e36

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

src/material/input/input.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -78,6 +78,7 @@ const _MatInputMixinBase: CanUpdateErrorStateCtor & typeof MatInputBase =
7878
// the native input element. Otherwise property bindings for those don't work.
7979
'[attr.id]': 'id',
8080
'[attr.placeholder]': 'placeholder',
81+
'[attr.data-placeholder]': 'placeholder',
8182
'[disabled]': 'disabled',
8283
'[required]': 'required',
8384
'[attr.readonly]': 'readonly && !_isNativeSelect || null',

0 commit comments

Comments
 (0)