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.

md-autocomplete: hasNotFoundTemplate isn't evaulated accurately #5400

@clshortfuse

Description

@clshortfuse

If you have multiple md-autocomplete items, hasNotFoundTemplate is sometimes incorrect. I'm not 100% how, but through stepping

var hasNotFoundTemplate = false;

is only executed once and it's a global variable that would affect all md-autocomplete values.

Here's a (sloppy) codepen to show the issue: http://codepen.io/anon/pen/PPemGr

If you type in the second box (without a md-not-found tag) and with no results found, ctrl.hasNotFound will be true. This means the box will show because notFoundVisible() will equate to true, making shouldShow() true.

Thought my stepping, it seems as though every item will iterate through the the template function, then every element will through the link command.

Also, hasNotFoundTemplate is never evaluated back to false.

Metadata

Metadata

Assignees

Labels

pr: merge readyThis PR is ready for a caretaker to review

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions