Skip to content
This repository was archived by the owner on Jan 13, 2025. It is now read-only.

Commit 1949989

Browse files
authored
fix(text-field): Made handleValidationAttributeMutation method public. (#2779)
1 parent d42eab4 commit 1949989

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

packages/mdc-textfield/README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -299,6 +299,7 @@ Method Signature | Description
299299
`isRequired() => boolean` | Returns whether the input is required.
300300
`setRequired(isRequired: boolean)` | Sets whether the input is required.
301301
`handleTextFieldInteraction(evt: Event) => void` | Handles click and keydown events originating from inside the Text Field component.
302+
`handleValidationAttributeMutation(mutationsList: !Array<MutationRecord>) => void` | Handles validation attribute changes.
302303
`activateFocus() => void` | Activates the focus state of the Text Field. Normally called in response to the input focus event.
303304
`deactivateFocus() => void` | Deactivates the focus state of the Text Field. Normally called in response to the input blur event.
304305
`setHelperTextContent(content: string) => void` | Sets the content of the helper text.

packages/mdc-textfield/foundation.js

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -123,7 +123,7 @@ class MDCTextFieldFoundation extends MDCFoundation {
123123
/** @private {function(!Event): undefined} */
124124
this.textFieldInteractionHandler_ = () => this.handleTextFieldInteraction();
125125
/** @private {function(!Array): undefined} */
126-
this.validationAttributeChangeHandler_ = (mutations) => this.handleValidationAttributeMutation_(mutations);
126+
this.validationAttributeChangeHandler_ = (mutations) => this.handleValidationAttributeMutation(mutations);
127127
/** @private {!MutationObserver} */
128128
this.validationObserver_;
129129
}
@@ -179,10 +179,9 @@ class MDCTextFieldFoundation extends MDCFoundation {
179179

180180
/**
181181
* Handles validation attribute changes
182-
* @param {Array<MutationRecord>} mutationsList
183-
* @private
182+
* @param {!Array<MutationRecord>} mutationsList
184183
*/
185-
handleValidationAttributeMutation_(mutationsList) {
184+
handleValidationAttributeMutation(mutationsList) {
186185
mutationsList.some((mutation) => {
187186
if (VALIDATION_ATTR_WHITELIST.indexOf(mutation.attributeName) > -1) {
188187
this.styleValidity_(true);

0 commit comments

Comments
 (0)