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

feat(select): Add select header to the md-select #2812

Closed
Eernie opened this issue Jan 26, 2017 · 19 comments
Closed

feat(select): Add select header to the md-select #2812

Eernie opened this issue Jan 26, 2017 · 19 comments
Assignees
Labels
feature This issue represents a new feature or feature request rather than a bug or bug fix

Comments

@Eernie
Copy link

Eernie commented Jan 26, 2017

Bug, feature request, or proposal:

Feature request

Yesterday I filled a pull request ( #2797 ) for adding a search bar in the md-select component. As @jelbourn pointed out this wasn't the right way to add this feature, so now I'm willing to do it the right way.
What's the best way to address this? Just implement the same functionality as material does it?

That will mean something like this is possible:

<md-select placeholder="Favorite food">
    <md-select-header>
        <input [ngModel]="searchTerm" type="search" placeholder="Search for a vegetable..">
    </md-select-header>   
        <md-option *ngFor="let food of foods | filter " [value]="food.value">
            {{ food.viewValue }}
        </md-option>
</md-select>
@jelbourn jelbourn added the feature This issue represents a new feature or feature request rather than a bug or bug fix label Jan 26, 2017
@jelbourn
Copy link
Member

The idea is pretty much the same as the AngularJS version. One of the things holding us back from working on this has been that we're not sure what the appropriate accessibility story for this feature is. The most common use case the the select header is a filter input, but the standard role="listbox" doesn't have anything like a associated filter. Adding it would require some research as to whether there is something we can do to make this interaction work for screen-reader users.

As far as API and implementation details go, @kara will likely have some input.

@Eernie
Copy link
Author

Eernie commented Jan 31, 2017

Is it possible that I port the AngularJS version for now and add the whole role="listbox" part later when this is clear?

@fxck
Copy link
Contributor

fxck commented Feb 6, 2017

@Eernie go for it

@crisbeto crisbeto assigned crisbeto and unassigned kara Feb 14, 2017
crisbeto added a commit to crisbeto/material2 that referenced this issue Feb 20, 2017
Adds a `md-select-header` component, which is a fixed header above the select's options. It allows for the user to project an input to be used for filtering long lists of options.

**Note:** This component only handles the positioning, styling and exposes the panel id for a11y. The functionality is up to the user to handle.

Fixes angular#2812.
@esinek
Copy link
Contributor

esinek commented Feb 21, 2017

@Eernie, FYI, another use case of md-select-header is a check all / uncheck all (button(s) or tri-state checkbox) if the options are multi-select.
Would be great if there were also a md-select-footer. For selects with a large number of options, md-select-footer could contain the paging controls (links/buttons to first, prev, next, last).

crisbeto added a commit to crisbeto/material2 that referenced this issue Feb 22, 2017
Adds a `md-select-header` component, which is a fixed header above the select's options. It allows for the user to project an input to be used for filtering long lists of options.

**Note:** This component only handles the positioning, styling and exposes the panel id for a11y. The functionality is up to the user to handle.

Fixes angular#2812.
crisbeto added a commit to crisbeto/material2 that referenced this issue Feb 23, 2017
Adds a `md-select-header` component, which is a fixed header above the select's options. It allows for the user to project an input to be used for filtering long lists of options.

**Note:** This component only handles the positioning, styling and exposes the panel id for a11y. The functionality is up to the user to handle.

Fixes angular#2812.
crisbeto added a commit to crisbeto/material2 that referenced this issue Jun 13, 2017
Adds a `md-select-header` component, which is a fixed header above the select's options. It allows for the user to project an input to be used for filtering long lists of options.

**Note:** This component only handles the positioning, styling and exposes the panel id for a11y. The functionality is up to the user to handle.

Fixes angular#2812.
crisbeto added a commit to crisbeto/material2 that referenced this issue Jun 14, 2017
Adds a `md-select-header` component, which is a fixed header above the select's options. It allows for the user to project an input to be used for filtering long lists of options.

**Note:** This component only handles the positioning, styling and exposes the panel id for a11y. The functionality is up to the user to handle.

Fixes angular#2812.
@exequiel09
Copy link

What's the status of this? Is this merged or not?

@JasonAHeron
Copy link

I was wondering if there was any progress on this?

@crisbeto
Copy link
Member

@JasonAHeron the related PR (#3211) was blocked for a while until we decide how to handle the accessibility of the header. It should be unblocked once #6856 gets in.

crisbeto added a commit to crisbeto/material2 that referenced this issue Oct 16, 2017
Adds a `mat-select-header` component, which is a fixed header above the select's options. It allows for the user to project an input to be used for filtering long lists of options.

**Note:** This component only handles the positioning, styling, some basic focus management and exposes the panel id for a11y. The functionality is up to the consumer to handle.

Fixes angular#2812.
crisbeto added a commit to crisbeto/material2 that referenced this issue Oct 16, 2017
Adds a `mat-select-header` component, which is a fixed header above the select's options. It allows for the user to project an input to be used for filtering long lists of options.

**Note:** This component only handles the positioning, styling, some basic focus management and exposes the panel id for a11y. The functionality is up to the consumer to handle.

Fixes angular#2812.
crisbeto added a commit to crisbeto/material2 that referenced this issue Oct 16, 2017
Adds a `mat-select-header` component, which is a fixed header above the select's options. It allows for the user to project an input to be used for filtering long lists of options.

**Note:** This component only handles the positioning, styling, some basic focus management and exposes the panel id for a11y. The functionality is up to the consumer to handle.

Fixes angular#2812.
@doronsever
Copy link

Any news on this issue?
It looks like #6856 was merged

@crisbeto
Copy link
Member

There's a pending pull request at #7835.

crisbeto added a commit to crisbeto/material2 that referenced this issue Nov 12, 2017
Adds a `mat-select-header` component, which is a fixed header above the select's options. It allows for the user to project an input to be used for filtering long lists of options.

**Note:** This component only handles the positioning, styling, some basic focus management and exposes the panel id for a11y. The functionality is up to the consumer to handle.

Fixes angular#2812.
@andplusblaw
Copy link

Hi I was wondering if 'mat-select-header' is available yet?

@jrood
Copy link
Contributor

jrood commented Dec 6, 2017

@andplusblaw unfortunately not yet. Please leave feedback at #7835 if you have any.

@ghost
Copy link

ghost commented Dec 20, 2017

when can we expect this feature to be work ?

@andplusblaw
Copy link

@jrood thank you

@liesahead
Copy link

Still no? More than 1 year passed

@irowbin
Copy link

irowbin commented Jan 24, 2019

Any progress on this one?

@sainisagar310
Copy link

+1

1 similar comment
@vehansayvazi
Copy link

+1

@jelbourn
Copy link
Member

Closing as a duplicate of #5697 because that one has more votes (even though this one is older)

@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 10, 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