Skip to content

Mat Autocomplete With Required Input Flashes Error on Option Select #18313

Open
@jdvoeller

Description

@jdvoeller

Bug, feature request, or proposal:

If a mat autocomplete has a required input, the input flashes red/invalid briefly upon selecting an item from the autocomplete. This only happens if nothing has been typed in the input field.

What is the expected behavior?

The input should not flash red if an option is in progress of being selected

What is the current behavior?

The input briefly shows as red as an option is selected

What are the steps to reproduce?

Stackblitz: https://stackblitz.com/edit/angular-vtjbve

Reproduction Steps:

  1. Click the input
  2. Click an option

What is the use-case or motivation for changing an existing behavior?

Can be confusing for end users to see an error flash like that

Which versions of Angular, Material, OS, TypeScript, browsers are affected?

Angular: 8.2.13
Material: 8.2.3
OS: win32 x64
TypeScript: 3.5.3
Browsers tested: Chrome Version: 79.0.3945.130

Is there anything else we should know?

N/A

Metadata

Metadata

Assignees

No one assigned

    Labels

    P3An issue that is relevant to core functions, but does not impede progress. Important, but not urgentarea: material/autocomplete

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions