You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Oct 2, 2019. It is now read-only.
I created tagging feature, where user can select from existing stored tags or create new if not existed. So if I have one tag "Algorithm" in dropdown, and user type "algo" then it allows creating new one. But if user type "algorithm" or "Algorithm", then both existing tag and "create new" displays. So it should allow insertion of new tag only if it is not already existing tag.
This is the array, which populates the ui-select: [ {uid: "0x943835545", name: "Algorithm"}]
Probably it should allow to filter on one property of object, for example name of the tag and ignore others. And if tag name exist then "Create new" label should disappear or disabled.
Link to minimally-working plunker that reproduces the issue:
This is happening on official Tagging example as well. This is someone else's plunker link. Check array of object example.
Version of Angular, UI-Select, and Bootstrap/Select2/Selectize CSS
I have handled the problem on frontend by calling custom function on "on-select" event, which handles unique tag insertion. But I wanted to know if there is something in-built in ui-select to make it unique based on single object property.
I had a look at the code but I cannot find any thing that makes it a unique value. Maybe this is something you could implement? I think this will add value to the ui-select.
Okay, that's great. Will test it. Hope you have tested it, and it's not breaking default functionalities, because this should be a configurable thing, not just default thing.
Thanks, for fast reply. I wanted push it ASAP. Tests will be written too (not really TDD while debugging unknown plugin to me).
In the scope of this changes we have to also propose changes to wiki. Any help much appreciated I am on hold with it till tomorrow.
Activity
davidetwc commentedon Oct 11, 2016
Hi, I have th same issue...
Jefiozie commentedon Oct 14, 2016
Are you using a custom tagging function? Or the default?
Rahul-Sagore commentedon Oct 14, 2016
Custom tagging means user can add new tags on the fly, right? This is the code I wrote, where addNewTag function return user typed string.
I have handled the problem on frontend by calling custom function on "on-select" event, which handles unique tag insertion. But I wanted to know if there is something in-built in ui-select to make it unique based on single object property.
Jefiozie commentedon Oct 14, 2016
I had a look at the code but I cannot find any thing that makes it a unique value. Maybe this is something you could implement? I think this will add value to the ui-select.
ISSUE-1820 angular-ui#1820
zajacmp3 commentedon Oct 20, 2016
Hi Guys, I had the same issue and I fixed and tested it in above PR.
Rahul-Sagore commentedon Oct 20, 2016
Okay, that's great. Will test it. Hope you have tested it, and it's not breaking default functionalities, because this should be a configurable thing, not just default thing.
Not everybody need this.
Jefiozie commentedon Oct 20, 2016
@zajacmp3, agree on the above comments also you are missing some test in your commit.
zajacmp3 commentedon Oct 20, 2016
Thanks, for fast reply. I wanted push it ASAP. Tests will be written too (not really TDD while debugging unknown plugin to me).
In the scope of this changes we have to also propose changes to wiki. Any help much appreciated I am on hold with it till tomorrow.
zajacmp3 commentedon Oct 20, 2016
My usage of it in html along with the tag:
zajacmp3 commentedon Oct 20, 2016
Added unit tests, corrected failing ones.
Functional is disabled by default. It is only enabled if you define the html tag object-unique-key.
I hope that will answer your concerns.
ISSUE 1820 angular-ui#1820
zajacmp3 commentedon Oct 21, 2016
I registered my fix in bower so it can be moved further down the pipeline in my organization.
If you want to test it just add an entry in your projects bower.json
zajacmp3 commentedon Nov 22, 2016
Hi Guys,
They is no response from repo maintainers on PR:
#1830
Maybe some of you are familiar what maintainer meant? Is there any pending work to be done?
Thanks,
Mateusz
4 remaining items