Skip to content
This repository was archived by the owner on Sep 5, 2024. It is now read-only.

Conversation

@Splaktar
Copy link
Contributor

PR Checklist

Please check your PR fulfills the following requirements:

  • The commit message follows our guidelines
  • Tests for the changes have been added or this is not a bug fix / enhancement
  • Docs have been added, updated, or were not required

PR Type

What kind of change does this PR introduce?

[x] Bugfix
[ ] Enhancement
[ ] Documentation content changes
[ ] Code style update (formatting, local variables)
[ ] Refactoring (no functional changes, no api changes)
[ ] Build related changes
[ ] CI related changes
[ ] Infrastructure changes
[ ] Other... Please describe:

What is the current behavior?

  • md-select's $isEmpty() implementation is a naive falsy check of a hashed Object and does not check the actual value

Fixes #10005

What is the new behavior?

  • change md-select's $isEmpty() implementation from a naive falsy check on an Object
    to a more robust check of the Object's value that is similar to AngularJS' default
  • add empty option to validations demo

Does this PR introduce a breaking change?

[ ] Yes
[x] No

Other information

- change md-select's `$isEmpty()` implementation from a naive falsy check
  to a more robust check that is similar to AngularJS' default
- add empty option to validations demo

Fixes #10005
@Splaktar Splaktar self-assigned this Dec 16, 2020
@Splaktar Splaktar added this to the 1.2.2 milestone Dec 16, 2020
@google-cla google-cla bot added the cla: yes PR author has signed Google's CLA: https://opensource.google.com/docs/cla/ label Dec 16, 2020
@Splaktar Splaktar added P2: required Issues that must be fixed. type: bug pr: merge ready This PR is ready for a caretaker to review labels Dec 16, 2020
@Splaktar Splaktar requested a review from mmalerba December 16, 2020 07:54
Copy link
Contributor

@mmalerba mmalerba left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@Splaktar Splaktar added the pr: lgtm This PR has been approved by the reviewer label Dec 16, 2020
@Splaktar Splaktar merged commit 61412b4 into master Dec 16, 2020
@Splaktar Splaktar deleted the select-fix-empty-option-form-state branch December 16, 2020 21:07
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

cla: yes PR author has signed Google's CLA: https://opensource.google.com/docs/cla/ P2: required Issues that must be fixed. pr: lgtm This PR has been approved by the reviewer pr: merge ready This PR is ready for a caretaker to review type: bug

Projects

None yet

Development

Successfully merging this pull request may close these issues.

select: form remains valid in a required md-select when empty option is selected

2 participants