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: 575341300
  • Loading branch information
Elliott Marquez authored and copybara-github committed Oct 21, 2023
1 parent 5c3db90 commit e2751d6
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 e2751d6

Please sign in to comment.