update IconList

This commit is contained in:
rlx 2011-10-24 21:50:54 +00:00
parent 19d5f811d6
commit 2bd4156f6c

View file

@ -212,7 +212,16 @@ Ox.IconList = function(options, self) {
return that.$element.value(id, key);
} else {
that.$element.value(id, key, value);
// FIXME: Like TextList, handle unique id and selection change here
if (key == self.unique) {
// unique id has changed
self.options.selected = self.options.selected.map(function(id_) {
return id_ == id ? value : id_
});
}
if (key == self.options.sort[0].key) {
// sort key has changed
that.$element.sort();
}
return that;
}
};