Skip to content

invalid MdSelect should highlight itself on parent form submitted #4611

Closed
@natsid

Description

@natsid

Bug, feature request, or proposal:

Bug

What is the expected behavior?

Expect md-select to show red (or 'warning' color) if it is invalid and its parent form is submitted.

What is the current behavior?

Currently the select does show warning color on touched and invalid, but not on parent form submitted and invalid.

What are the steps to reproduce?

See this plunk. Both the select and the input are 'required'. Click 'submit' and see that the select does not change its appearance like the input does.

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

Would like to highlight errors on submit.

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

all

Is there anything else we should know?

The MdSelect likely needs to inject an @optional NgForm/@optional FormGroupDirective in its constructor like MdInputContainer does so that it can keep track of its submitted state.

Metadata

Metadata

Assignees

Labels

P3An issue that is relevant to core functions, but does not impede progress. Important, but not urgent

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions