Skip to content
This repository was archived by the owner on Sep 5, 2024. It is now read-only.

Conversation

devversion
Copy link
Member

@devversion devversion commented Jul 8, 2016

  • Currently when specifying attributes like md-input-maxlength and the limit as reached, the ngModelCtrl will clear the $viewValue, which causes the
    input to keep the entered text, but the autocomplete already knows that the searchText is empty.
  • This causes the dropdown to open, even if the input "should" not show up with all results.
  • Also the input value will be cleared, which is not correct.

@ThomasBurleson Please read this before reviewing:

  • Carlos had a concern, that the autocomplete's behavior will break, since the autocomplete did only emit the searchTextChange event if it's valid.

  • I had a discussion with @robertmesserle about the concerns of @clshortfuse.
    We both agreed that the documentation mentions clearly that the searchTextChange will be emitted always (regardless of validity of the searchText)

    The developers should be able to always track the searchText.

  • Another concern was, that the autocomplete currently only queries for results, if the searchText is valid (this is not mentioned / stated in the documentation).

    The autocomplete should always query for the results (regardless of the validity of the searchText).
    Developers can easily reduce the amount of queries, by just modifying their queryFn.

  • Something to consider is, whether this change should have any special announcement in the changelog or not.

Fixes #8947.

* Currently when specifying attributes like `md-input-maxlength` and the limit as reached, the ngModelCtrl will clear the `$viewValue`, which causes the
  input to keep the entered text, but the autocomplete already knows that the searchText is empty.

- This causes the dropdown to open, even if the input "should" not show up with all results.
- Also the input value will be cleared, which is not correct.

Fixes angular#8947.
@devversion devversion added the needs: review This PR is waiting on review from the team label Jul 8, 2016
@ThomasBurleson
Copy link
Contributor

@devversion - sounds like a breaking change. Thx.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
- Breaking Change pr: merge ready This PR is ready for a caretaker to review
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants