-
Notifications
You must be signed in to change notification settings - Fork 6.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix(checkbox, slide-toggle): forward required attribute to input. #1137
fix(checkbox, slide-toggle): forward required attribute to input. #1137
Conversation
3474fed
to
0a12419
Compare
// Move the input to the bottom and in the middle. | ||
// Visual improvement to properly show browser popups when being required. | ||
bottom: 0; | ||
left: 50%; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
transform: translateX(-50%)
?
Also, it would be cool if we had a screenshot of what this looked like with and without this modification.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I was actually going to upload some screenshots, but this Safari thing distracted me too much 😄
Screenshots are now in the PR description.
Also we already use an absolute position here, and I want the 50%
to be relative to the inner container.
LGTM |
823307e
to
5f07953
Compare
@@ -12,6 +12,7 @@ import { | |||
ModuleWithProviders, | |||
} from '@angular/core'; | |||
import {NG_VALUE_ACCESSOR, ControlValueAccessor} from '@angular/forms'; | |||
import {BooleanFieldValue} from '@angular2-material/core/annotations/field-value'; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please use @angular2-material/core
. We don't support deep imports.
There was a bug uncovered by the build. Need to fix. |
LGTM. |
f7d9be6
to
21c92ce
Compare
@jelbourn Rebased. |
5f1b84a
to
6c788e8
Compare
* Now forwards the required attribute to the input. * This allows us to take advantage of the native browser behavior to prevent a form submission. Fixes angular#1133,
6c788e8
to
a8b724a
Compare
Rebased on top of the latest theme changes. |
hello, |
This issue has been automatically locked due to inactivity. Read more about our automatic conversation locking policy. This action has been performed automatically by a bot. |
Fixes #1133,