Skip to content

triggerValue of MdSelect as @Input #5294

Closed

Description

@RobYed

Bug, feature request, or proposal:

feature request

What is the expected behavior?

I'd like to be able to set the triggerValue of a MdSelect. The use case is, that I wish to display a triggerValue which is different from the MdOption's textContent (which is automatically taken).
Therefore it would be great, if triggerValue would be an @Input of MdSelect.

What is the current behavior?

triggerValue is a readonly property of MdSelect. Consequently there is no possibility to manually set a triggerValue (if there is some, let me know!).

What is the use-case or motivation for changing an existing behavior?

I use a MdOption to set a filter for some search. It shows the option's values and their count of occurences. When an option is selected, the count of occurences will appear in the MdSelect's triggerValue, but without styling, therefore looking fairly misplaced.

Which versions of Angular, Material, OS, TypeScript, browsers are affected?

Angular: 4.2.2
Material: 2.0.0-beta.6

Is there anything else we should know?

If this is a feature you consider to add, I could try to implement it and open a PR.

And of course, big thanks for this great project! I was also using the AngularJS version of Material and it has always been a pleasure to use it!!

Activity

  1. changed the title [-]`triggerValue` of `MdSelect` as `@Input`[/-] [+]triggerValue of MdSelect as @Input[/+] on Jun 22, 2017
  2. willshowell commented on Jun 22, 2017

    @willshowell
    Contributor

    This seems kinda like #2275 (with PR at #3341).

  3. RobYed commented on Jun 22, 2017

    @RobYed
    Author

    Yeah, that one would fix my issue. Thanks!

  4. angular-automatic-lock-bot commented on Sep 5, 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.

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions