material icon indicating copy to clipboard operation
material copied to clipboard

autocomplete: uncalled-for evaluation of md-items on item select

Open exchsac opened this issue 8 years ago • 2 comments

Actual Behavior:

  • What is the issue? * With md-no-cache="true": when an item from the dropdown list is selected with the mouse pointer an unnecessary call to the search function is made. This is wasteful especially when using web services with usage limits and may also disrupt the program logic.
  • What is the expected behaviour? It should behave in the same way as when the item is selected with the keyboard (that is no call to the search function).

CodePen (or steps to reproduce the issue): *

  • CodePen Demo which shows your issue: http://codepen.io/exchsac/pen/BQgypR

Angular Versions: *

  • Angular Version: >=1.5.8 <1.6.0
  • Angular Material Version: 1.1.1, 1.1.0

Additional Information:

  • Browser Type: Chrome, Firefox, Safari

exchsac avatar Dec 27 '16 19:12 exchsac

Updated CodePen for 1.1.7 confirms that this is still an issue.

Splaktar avatar Mar 16 '18 06:03 Splaktar

Please also consider the case when md-chips is used in combination with the md-autocomplete. The search function is getting called three times in that case. Updated CodePen

saskodh avatar May 01 '18 00:05 saskodh