components icon indicating copy to clipboard operation
components copied to clipboard

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

Open Eernie opened this issue 9 years ago • 19 comments

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>

Eernie avatar Jan 26 '17 08:01 Eernie

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.

jelbourn avatar Jan 26 '17 18:01 jelbourn

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

Eernie avatar Jan 31 '17 19:01 Eernie

@Eernie go for it

fxck avatar Feb 06 '17 08:02 fxck

@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).

esinek avatar Feb 21 '17 03:02 esinek

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

exequiel09 avatar Aug 28 '17 21:08 exequiel09

I was wondering if there was any progress on this?

JasonAHeron avatar Sep 26 '17 00:09 JasonAHeron

@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 https://github.com/angular/material2/pull/6856 gets in.

crisbeto avatar Sep 26 '17 05:09 crisbeto

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

doronsever avatar Oct 22 '17 07:10 doronsever

There's a pending pull request at https://github.com/angular/material2/pull/7835.

crisbeto avatar Oct 22 '17 08:10 crisbeto

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

andplusblaw avatar Nov 30 '17 03:11 andplusblaw

@andplusblaw unfortunately not yet. Please leave feedback at https://github.com/angular/material2/pull/7835 if you have any.

jrood avatar Dec 06 '17 19:12 jrood

when can we expect this feature to be work ?

ghost avatar Dec 20 '17 12:12 ghost

@jrood thank you

andplusblaw avatar Dec 20 '17 14:12 andplusblaw

Still no? More than 1 year passed

liesahead avatar Dec 11 '18 09:12 liesahead

Any progress on this one?

irowbin avatar Jan 24 '19 08:01 irowbin

+1

sainisagar310 avatar Feb 23 '19 18:02 sainisagar310

+1

vehansayvazi avatar Apr 09 '19 17:04 vehansayvazi

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

jelbourn avatar May 17 '19 23:05 jelbourn

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.