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

md-autocomplete TypeError with Angular 1.4.1 #3637

Closed
villelahdenvuo opened this issue Jul 8, 2015 · 10 comments
Closed

md-autocomplete TypeError with Angular 1.4.1 #3637

villelahdenvuo opened this issue Jul 8, 2015 · 10 comments
Assignees
Milestone

Comments

@villelahdenvuo
Copy link
Contributor

When typing into the input I get:

TypeError: Cannot use 'in' operator to search for 'ctrl' in *

* searchString is what I typed in the field.

Demo of the issue: http://codepen.io/anon/pen/PqRgVO

@nextor2k
Copy link

nextor2k commented Jul 8, 2015

+1 in version 1.4.2 too

@ThomasBurleson
Copy link
Contributor

@robertmesserle - is this an AngularJS issue or an Angular Material issue?

@ThomasBurleson ThomasBurleson modified the milestones: 0.11.0, 0.10.1 Jul 9, 2015
@villelahdenvuo
Copy link
Contributor Author

@ThomasBurleson There is no problem with Angular Material 0.10.0, after upgradign to 0.10.1-rc1 the problem occurs. I tried to debug it, but it is in some function that Angular generates on runtime, so it's a bit tricky to track down.

@nextor2k
Copy link

nextor2k commented Jul 9, 2015

in 0.10.1-rc1 (or master) using angular 1.4.1+ the error occurs.

@robertmesserle
Copy link
Contributor

@ThomasBurleson This was from a recent PR that was merged (it's on our end) - committing a fix now.

@epelc
Copy link
Contributor

epelc commented Jul 13, 2015

@robertmesserle Your fix breaks mdSelectedItemChange if it expects the selected item to be passed in as a parameter. This use to work but your fix essentially removed the argument.

You can work around this by binding something to mdSelectedItem and using that object instead of the argument to mdSelectedItemChange but I think it'd be good to mention this in the change log as it tripped me up. I had to step through a few commits related to auto complete to find it.

@robertmesserle
Copy link
Contributor

@epelc This was intentional (for now) - the idea is that the user has access to these values through bindings; however, I am going to re-introduce that functionality today.

@robertmesserle
Copy link
Contributor

@epelc Committing the change now, including unit-test

@epelc
Copy link
Contributor

epelc commented Jul 13, 2015

@robertmesserle Thanks I'll let you know if it works

robertmesserle pushed a commit that referenced this issue Jul 13, 2015
@epelc
Copy link
Contributor

epelc commented Jul 13, 2015

@robertmesserle It works! Thanks for fixing this.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants