Commit 36c39a45 authored by LE GAC Renaud's avatar LE GAC Renaud
Browse files

Update Table.js to fix a bug in the method getValue.

parent 8bec2477
......@@ -175,24 +175,25 @@ Ext.define('Dbui.form.field.Table', {
var me = this,
data = [],
header = me.header,
records = me.store.getRange();
// serialize the record as a list of values
// ignore the field with the idProperty
records.forEach(function (record) {
var j = 0,
kid = record.getIdProperty(),
var kid = record.getIdProperty(),
isRowEmpty = true,
row = Array(me.numColumns);
Ext.Object.each(record.getData(), function(prop, val) {
if (prop !== kid) {
row[j] = val;
j += 1;
isRowEmpty = false;
row[header.indexOf(prop)] = val;
}
});
if (me.ignoreEmptyRows && j === 0) {
if (me.ignoreEmptyRows && isRowEmpty) {
return;
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment