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

Deprecate md-select-label #2684

Closed
rschmukler opened this issue May 3, 2015 · 4 comments
Closed

Deprecate md-select-label #2684

rschmukler opened this issue May 3, 2015 · 4 comments
Assignees
Milestone

Comments

@rschmukler
Copy link
Contributor

We used to allow people to customize what a select would show as the value when it was selected. This is bad UX as it can lead to a user thinking that was is selected is not what they clicked on.

We should follow the HTML native select's behavior of using the option.textContent as the display value for the label. placeholder can be used for when no value is selected (as it currently, hopefully is).

@rschmukler rschmukler added the needs: team discussion This issue requires a decision from the team before moving forward. label May 3, 2015
@rschmukler rschmukler added this to the 0.10.0 milestone May 3, 2015
@rschmukler rschmukler self-assigned this May 3, 2015
@rschmukler rschmukler removed the needs: team discussion This issue requires a decision from the team before moving forward. label May 21, 2015
@Anthropic
Copy link

In the Material spec there is an option to have additional label text with it's own design rules so that both can be shown without overriding the display of the value.
http://www.google.com/design/spec/components/menus.html#menus-simple-menus

That would be the preferred behavioural outcome for my projects.

@bshir
Copy link

bshir commented Aug 12, 2015

Hello,
I think that this update has taken away desired functionality from the md-select directive. There are cases where customizing the select options could be considered an improvement to the UX. Opinions may vary.
Examples...
a select element containing color selections with the color displayed beside the hex code (see pen below).
a select element which formats each option text in a different color (red, yellow, green)

Is there a way to configure this with 10.1? I'm currently able to do options with custom markup (as before) but unable to maintain consistency with the selected option since md-select-label has been removed. This creates the inconsistent UX.

It's entirely possible that I'm missing something here. Let me know if anything here requires clarification. Thanks

Here's a modification from a demo codepen demonstrating the behavior: http://codepen.io/anon/pen/rVbLOm

@JobaDiniz
Copy link

What about when you use md-optgroup? The md-option can have the same text among different md-optgroup and this will confuse users.

<md-select ng-model="vm.event.agenda" class="event-agenda">
                        <md-optgroup label="{{group.name}}" ng-repeat="group in vm.groupedAgendas">
                            <md-option ng-value="agenda.id" ng-repeat="agenda in group.agendas">{{agenda.name}}</md-option>
                        </md-optgroup>
                    </md-select>

The selected text in my case should be: group.name - agenda.name

How to accomplish that?

@rishabhmhjn
Copy link

+1

md-select-label should be included

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants