Skip to content

Autocomplete optionSelections to return one observable rather than an array #3205

Closed

Description

Bug, feature request, or proposal:

It would be easier to consume optionSelections if it returned a single observable that streamed which option was selected rather than an array, or alternatively emitted a change event like mdSelect.

The modification would be to this function:
https://github.com/angular/material2/blob/master/src/lib/autocomplete/autocomplete-trigger.ts#L163

What is the expected behavior?

The user should be able to call

trigger.optionSelections.subscribe(optionSelected => {
    // do stuff with the selected option
})

or alternatively listen to a change event

What is the current behavior?

Currently, to listen to what option changed, I have to subscribe to each one of the observes in optionSelections[]

Is there anything else we should know?

You guys are awesome :D I love angular2 material!!
🎆 Wooo autocomplete 🎆

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Assignees

No one assigned

    Labels

    P5The team acknowledges the request but does not plan to address it, it remains open for discussionfeatureThis issue represents a new feature or feature request rather than a bug or bug fix

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions