onSelect: Prototype.K,
onShow: Prototype.K,
onType: Prototype.K,
+ filterCallback: Prototype.K,
paramName: elt.readAttribute('name'),
tokens: [],
keydownObserver: this.elt
$(this.opts.indicator).hide();
}
+ choices = this.opts.filterCallback(choices);
if (!choices.size()) {
if (this.knl) {
this.knl.hide();
minTriggerWidth: 100,
// Allow for a function that filters the display value
// This function should *always* return escaped HTML
- displayFilter: function(t) { return t.escapeHTML() }
+ displayFilter: function(t) { return t.escapeHTML() },
+ filterCallback: this._filterChoices.bind(this)
}, params);
// Array to hold the currently selected items to ease with removing
realValues.push(this.selectedItems[x].rawValue);
}
$(this.p.items).value = realValues.join(',');
+ },
+
+ _filterChoices: function(c)
+ {
+ this.selectedItems.each(function(item) {
+ c = c.without(item.displayValue);
+ });
+ return c;
}
});
\ No newline at end of file