Skip to content

Commit

Permalink
chore: add missing required overrides to symbol properties
Browse files Browse the repository at this point in the history
PiperOrigin-RevId: 676149134
  • Loading branch information
material-web-copybara authored and copybara-github committed Sep 18, 2024
1 parent 40b8cb3 commit b10ce3f
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 10 deletions.
6 changes: 3 additions & 3 deletions labs/behaviors/constraint-validation_test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -32,15 +32,15 @@ describe('mixinConstraintValidation()', () => {
return html`<div id="root"></div>`;
}

[createValidator]() {
override [createValidator]() {
return new CheckboxValidator(() => this);
}

[getValidityAnchor]() {
override [getValidityAnchor]() {
return this.shadowRoot?.querySelector<HTMLElement>('#root') ?? null;
}

[getFormValue]() {
override [getFormValue]() {
return String(this.checked);
}
}
Expand Down
6 changes: 3 additions & 3 deletions labs/behaviors/on-report-validity_test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -38,15 +38,15 @@ describe('mixinOnReportValidity()', () => {
return html`<div id="root"></div>`;
}

[createValidator]() {
override [createValidator]() {
return new CheckboxValidator(() => this);
}

[getValidityAnchor]() {
override [getValidityAnchor]() {
return this.shadowRoot?.querySelector<HTMLElement>('#root') ?? null;
}

[getFormValue]() {
override [getFormValue]() {
return String(this.checked);
}
}
Expand Down
4 changes: 2 additions & 2 deletions radio/internal/radio.ts
Original file line number Diff line number Diff line change
Expand Up @@ -183,7 +183,7 @@ export class Radio extends radioBaseClass {
this.checked = state === 'true';
}

[createValidator]() {
override [createValidator]() {
return new RadioValidator(() => {
if (!this.selectionController) {
// Validation runs on superclass construction, so selection controller
Expand All @@ -195,7 +195,7 @@ export class Radio extends radioBaseClass {
});
}

[getValidityAnchor]() {
override [getValidityAnchor]() {
return this.container;
}
}
4 changes: 2 additions & 2 deletions switch/internal/switch.ts
Original file line number Diff line number Diff line change
Expand Up @@ -241,14 +241,14 @@ export class Switch extends switchBaseClass {
this.selected = state === 'true';
}

[createValidator]() {
override [createValidator]() {
return new CheckboxValidator(() => ({
checked: this.selected,
required: this.required,
}));
}

[getValidityAnchor]() {
override [getValidityAnchor]() {
return this.input;
}
}

0 comments on commit b10ce3f

Please sign in to comment.