Skip to content

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

Closed

Description

@Eernie

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>

Activity

  1. added
    feature
    on Jan 26, 2017
  2. jelbourn commented on Jan 26, 2017

    @jelbourn
    Contributor

    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.

  3. Eernie commented on Jan 31, 2017

    @Eernie
    Author

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

  4. fxck commented on Feb 6, 2017

    @fxck
    Contributor

    @Eernie go for it

  5. assigned and unassigned on Feb 14, 2017
  6. added a commit that references this issue on Feb 20, 2017
    37b8056
  7. esinek commented on Feb 21, 2017

    @esinek
    Contributor

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

  8. added 2 commits that reference this issue on Feb 22, 2017
    4c37b61
    04f1c07
  9. added 2 commits that reference this issue on Jun 13, 2017
    bcabda9
    2420398
  10. exequiel09 commented on Aug 28, 2017

    @exequiel09

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

  11. 5 remaining items

  12. doronsever commented on Oct 22, 2017

    @doronsever

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

  13. crisbeto commented on Oct 22, 2017

    @crisbeto
    Member

    There's a pending pull request at #7835.

  14. added a commit that references this issue on Nov 12, 2017
    2c3d45a
  15. andplusblaw commented on Nov 30, 2017

    @andplusblaw

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

  16. jrood commented on Dec 6, 2017

    @jrood
    Contributor

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

  17. andplusblaw commented on Dec 20, 2017

    @andplusblaw

    @jrood thank you

  18. liesahead commented on Dec 11, 2018

    @liesahead

    Still no? More than 1 year passed

  19. irowbin commented on Jan 24, 2019

    @irowbin

    Any progress on this one?

  20. sainisagar310 commented on Feb 23, 2019

    @sainisagar310

    +1

  21. vehansayvazi commented on Apr 9, 2019

    @vehansayvazi

    +1

  22. jelbourn commented on May 17, 2019

    @jelbourn
    Contributor

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

  23. angular-automatic-lock-bot commented on Sep 10, 2019

    @angular-automatic-lock-bot

    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.

  24. locked and limited conversation to collaborators on Sep 10, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

feature

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions