-
Notifications
You must be signed in to change notification settings - Fork 1.8k
"Track by" does not work on multiple ui-select with objects #665
Comments
I am also seeing this issue. It's become very problematic. |
It's hard to look back to the old files because the code was recently split into new files. |
+1 :( |
Is there going to be a fix for this some time soon? At the moment I'm having to resort to using angular.extend() to add the $$hashKey |
+1 |
Exist a partial solution for this problem?? @nashant. |
Yeah, this one kinda hurts... track by usually helps with performance, and I have a huge list of objects (languages) in a multiselect. |
+1 |
2 similar comments
+1 |
+1 |
+1 |
8 similar comments
+1 |
+1 |
+1 |
+1 |
+1 |
+1 |
+1 |
+1 |
…void failures with 'track by'
I hope my fix helps |
I have seen the pull request, #1383, it says the CI tests failed. Thanks for your posting |
The pull request fails because of the old build workflow. Other pull requests have the same issue. |
:( good try! |
+1 |
+1 |
Still occured in v0.16.1.
|
Also on 0.17.1 still occurring. |
The first response here provided a solution for me. It seems that simply including "multiple" as an attribute rather than " multiple='true' " causes validation errors within select.js. Also, if you track by $index with the above change it seems to work fine.
|
Just gave it a test quick and this does indeed solve this issue... |
The line $select.multiple = (angular.isDefined(attrs.multiple)) ? (attrs.multiple === '') ? true : (attrs.multiple.toLowerCase() === 'true') : false; Doesn't exist.
|
+1 |
For me it worked, when I renamed the variable and added
|
@agupta-q4 Thank you man for a code! It didn't resolved the issue with a hash key but fixed my problem with filtering using track by =) |
+1 |
Here the example:
http://plnkr.co/edit/3KLlmX19Qx6meOk52Jyn?p=preview
Using
track by
in "Array of objects" example has no effect, angular generates$$hashKey
fields for selected objects.The text was updated successfully, but these errors were encountered: