Return children length only if children field is loaded

Closes #12906
This commit is contained in:
Cédric Krier
2024-01-06 22:56:46 +01:00
parent 5a24591cd5
commit 5f3df70bd9
+5 -1
View File
@@ -1327,7 +1327,11 @@
if (!row || !this.children_field) {
return this.rows.length;
}
return row.record._values[this.children_field].length;
if (row.record.is_loaded(this.children_field)) {
return row.record.field_get_client(this.children_field).length;
} else {
return 0;
}
},
set_cursor: function(new_, reset_view) {
var i, root_group, path, row_path, row, column;