Skip to content
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

Ability to imperatively float md-input placeholder #2466

Closed
kara opened this issue Dec 29, 2016 · 1 comment · Fixed by #2585
Closed

Ability to imperatively float md-input placeholder #2466

kara opened this issue Dec 29, 2016 · 1 comment · Fixed by #2585
Assignees
Labels
feature This issue represents a new feature or feature request rather than a bug or bug fix

Comments

@kara
Copy link
Contributor

kara commented Dec 29, 2016

Currently there is a floatingPlaceholder property on md-input-container that controls whether or not you'd like a floating placeholder at all. This property effectively disables the floating placeholder.

However, it's not meant to be an imperative way to toggle the floating placeholder on and off. If you try to set floatingPlaceholder to true, it doesn't actual float it. It will still be gated on the two conditions that the value must not be empty or the input must be focused.

We should add a way to actually toggle the placeholder, not just disable it. The motivation for this change is the autocomplete. Sometimes the text field will be empty and unfocused (e.g. if you are keying down through the option list), but the placeholder shouldn't reset.

cc @mmalerba

@kara kara added the feature This issue represents a new feature or feature request rather than a bug or bug fix label Dec 29, 2016
@devversion devversion self-assigned this Jan 10, 2017
devversion added a commit to devversion/material2 that referenced this issue Jan 10, 2017
Refactors the `[floatingPlaceholder]` input to be able to specifiy whether the label should always float or not.

There are three options for the `floatingPlaceholder` input binding now

- If set to `true`, the placeholder will *always* float
- If set to `false`, the placeholder will *never* float
- If set to `null`, the placeholder will float if text is entered.

Closes angular#2466
devversion added a commit to devversion/material2 that referenced this issue Jan 10, 2017
Refactors the `[floatingPlaceholder]` input to be able to specifiy whether the label should always float or not.

There are three options for the `floatingPlaceholder` input binding now

- If set to `true`, the placeholder will *always* float
- If set to `false`, the placeholder will *never* float
- If set to `null`, the placeholder will float if text is entered.

Closes angular#2466
devversion added a commit to devversion/material2 that referenced this issue Jan 14, 2017
Refactors the `[floatingPlaceholder]` input to be able to specifiy whether the label should always float or not.

There are three options for the `floatingPlaceholder` input binding now

- If set to `true`, the placeholder will *always* float
- If set to `false`, the placeholder will *never* float
- If set to `null`, the placeholder will float if text is entered.

Closes angular#2466
devversion added a commit to devversion/material2 that referenced this issue Jan 27, 2017
Refactors the `[floatingPlaceholder]` input to be able to specifiy whether the label should always float or not.

There are three options for the `floatingPlaceholder` input binding now

- If set to `true`, the placeholder will *always* float
- If set to `false`, the placeholder will *never* float
- If set to `null`, the placeholder will float if text is entered.

Closes angular#2466
devversion added a commit to devversion/material2 that referenced this issue Feb 1, 2017
Refactors the `[floatingPlaceholder]` input to be able to specifiy whether the label should always float or not.

There are three options for the `floatingPlaceholder` input binding now

- If set to `true`, the placeholder will *always* float
- If set to `false`, the placeholder will *never* float
- If set to `null`, the placeholder will float if text is entered.

Closes angular#2466
devversion added a commit to devversion/material2 that referenced this issue Feb 1, 2017
Refactors the `[floatingPlaceholder]` input to be able to specifiy whether the label should always float or not.

There are three options for the `floatingPlaceholder` input binding now

- If set to `true`, the placeholder will *always* float
- If set to `false`, the placeholder will *never* float
- If set to `null`, the placeholder will float if text is entered.

Closes angular#2466
@angular-automatic-lock-bot
Copy link

This issue has been automatically locked due to inactivity.
Please file a new issue if you are encountering a similar or related problem.

Read more about our automatic conversation locking policy.

This action has been performed automatically by a bot.

@angular-automatic-lock-bot angular-automatic-lock-bot bot locked and limited conversation to collaborators Sep 5, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
feature This issue represents a new feature or feature request rather than a bug or bug fix
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants