FAQ | This is a LIVE service | Changelog

Skip to content
Snippets Groups Projects

Missing feature: a user/group cannot be selected twice.

Merged Mike Bamford requested to merge issue-15-cannot-select-item-twice into master
3 files
+ 19
2
Compare changes
  • Side-by-side
  • Inline
Files
3
@@ -34,8 +34,13 @@
processResults: function (data) {
if (data.searchId_g != searchId_g)
return;
// create the set of current selections
var groupids = new Set($select.select2('data').map(function(item) {return item.id}));
// filter out any results that are currently selected
return {
results: $.map(data.groups, function(group) {
results: data.groups.filter(function(group) {
return ! groupids.has(group.groupid)
}).map(function(group) {
return create_data(group.groupid, group.title)
})
};
Loading