don't update table list cell value while editing cell

This commit is contained in:
rlx 2013-08-11 08:10:26 +00:00
parent 607106ac67
commit 24adbd3894

View file

@ -1036,7 +1036,7 @@ Ox.TableList = function(options, self) {
// into $input if triggered via keyboard shortcut // into $input if triggered via keyboard shortcut
setTimeout(function() { setTimeout(function() {
$input.focusInput(select); $input.focusInput(select);
}, 0); });
function submit() { function submit() {
var value = $input.value(); var value = $input.value();
$input.remove(); $input.remove();
@ -1226,7 +1226,9 @@ Ox.TableList = function(options, self) {
id = value; id = value;
} }
$cell = getCell(id, key); $cell = getCell(id, key);
$cell && $cell.html(formatValue(key, value, that.$body.value(id))); if ($cell && !$cell.is('.OxEdit')) {
$cell.html(formatValue(key, value, that.$body.value(id)));
}
if (!self.options.sortable && key == self.options.sort[0].key) { if (!self.options.sortable && key == self.options.sort[0].key) {
// sort key has changed // sort key has changed
that.$body.sort(); that.$body.sort();