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

mdAutocomplete: auto-select doesn't select if value is re-entered and caching is enabled  #8836

@mckenzielong

Description

@mckenzielong

Actual behavior:

  • What is the issue? * The autocomplete will not auto-select the value if it is re-entered and the built in caching is enabled. For example 'value' gets selected and the callback is fired with 'value'. I remove 'value' and undefined will be provided in the callback. Re-entering 'value' will not trigger the autoselect again. This happens after any value has been auto-selected and removed, and only appears to be happening when the internal cache (aka not using md-no-cache) is used.

probably related to #8768 (item 7 of that issue, though that issue is severely lacking information.)

  • What is the expected behavior? The value will be auto-selected again as it was the first time it was auto-selected.

CodePen or Steps to reproduce the issue: *

  • CodePen Demo which shows your issue : http://codepen.io/mckenzielong/pen/yJgByz
  • Details: First enter the value 'Hawaii' -- it will be auto-selected (note the callback). Tab out to the check box, then shift-tab back and clear the value (note the callback.) Now re-enter 'Hawaii'. The suggestions open up and the value is not automatically selected.

md-no-cache returns the expected behavior.

Angular Versions: *

  • Angular Version: 1.5.6
  • Angular Material Version: 1.1.0 rc5

Additional Information:

  • Browser Type: * Chrome/Opera
  • Browser Version: * 50/36
  • OS: * Windows 7 64bit
  • Stack Traces: N/A

Shortcut to create a new CodePen Demo.
Note: * indicates required information. Without this information, your issue may be auto-closed.

Do not modify the titles or questions. Simply add your responses to the ends of the questions.
Add more lines if needed.

Metadata

Metadata

Assignees

Labels

has: Pull RequestA PR has been created to address this issue

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions