forked from 0x2620/oxjs
use Ox.debounce to fix instant list selection, fixes #2142
This commit is contained in:
parent
92a122eb0a
commit
d039d0c781
2 changed files with 32 additions and 45 deletions
|
|
@ -351,17 +351,11 @@ Ox.ArrayEditable = function(options, self) {
|
|||
}
|
||||
}
|
||||
|
||||
function triggerSelectEvent() {
|
||||
if (!self.triggered) {
|
||||
that.triggerEvent('select', {
|
||||
id: self.options.selected
|
||||
});
|
||||
self.triggered = true;
|
||||
setTimeout(function() {
|
||||
self.triggered = false;
|
||||
}, 250);
|
||||
}
|
||||
}
|
||||
var triggerSelectEvent = Ox.debounce(function() {
|
||||
that.triggerEvent('select', {
|
||||
id: self.options.selected
|
||||
});
|
||||
}, true);
|
||||
|
||||
/*@
|
||||
addItem <f> addItem
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue