Skip to content

Commit

Permalink
fix(select): form failure no longer throws non-focusable error
Browse files Browse the repository at this point in the history
fixes #5078

PiperOrigin-RevId: 575361459
  • Loading branch information
e111077 authored and Copybara-Service committed Oct 21, 2023
1 parent 5c3db90 commit a5a6974
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion select/internal/select.ts
Original file line number Diff line number Diff line change
Expand Up @@ -801,7 +801,9 @@ export abstract class Select extends LitElement {
const validationMessage = this.customValidationMessage ||
valueMissing && this.getRequiredValidationMessage() || '';

this.internals.setValidity({valueMissing, customError}, validationMessage);
this.internals.setValidity(
{valueMissing, customError}, validationMessage,
this.field ?? undefined);
}

// Returns the platform `<select>` validation message for i18n.
Expand Down

0 comments on commit a5a6974

Please sign in to comment.