Reset display_size of TreeView when group is cleared or changed
This avoids to render unnecessary rows. issue8918 review274591002
This commit is contained in:
@@ -1,3 +1,4 @@
|
||||
* Reset display_size of TreeView when group is cleared or changed
|
||||
* Allow relation field to be selected in CSV export
|
||||
* Hide empty cell on small screen
|
||||
* Support validate attribute of wizard's Button
|
||||
|
||||
@@ -1156,6 +1156,9 @@
|
||||
}
|
||||
group.screens.push(this);
|
||||
this.tree_states_done = [];
|
||||
this.views.map(function(view) {
|
||||
view.reset();
|
||||
});
|
||||
this.order = null;
|
||||
this.group = group;
|
||||
this.model = group.model;
|
||||
@@ -1329,6 +1332,9 @@
|
||||
clear: function() {
|
||||
this.current_record = null;
|
||||
this.group.clear();
|
||||
this.views.map(function(view) {
|
||||
view.reset();
|
||||
});
|
||||
},
|
||||
default_row_activate: function() {
|
||||
if ((this.current_view.view_type == 'tree') &&
|
||||
|
||||
@@ -34,6 +34,7 @@
|
||||
this, this.screen.exclude_field, field_attrs)
|
||||
.parse(xml.children()[0]);
|
||||
}
|
||||
this.reset();
|
||||
},
|
||||
set_value: function() {
|
||||
},
|
||||
@@ -55,6 +56,8 @@
|
||||
get_buttons: function() {
|
||||
return [];
|
||||
},
|
||||
reset: function() {
|
||||
},
|
||||
});
|
||||
|
||||
Sao.View.idpath2path = function(tree, idpath) {
|
||||
|
||||
+3
-1
@@ -89,6 +89,7 @@
|
||||
view_type: 'tree',
|
||||
xml_parser: Sao.View.TreeXMLViewParser,
|
||||
draggable: false,
|
||||
display_size: Sao.config.display_size,
|
||||
init: function(view_id, screen, xml, children_field) {
|
||||
this.children_field = children_field;
|
||||
this.sum_widgets = {};
|
||||
@@ -211,7 +212,8 @@
|
||||
this.table.append(this.tbody);
|
||||
|
||||
this.set_drag_and_drop();
|
||||
|
||||
},
|
||||
reset: function() {
|
||||
this.display_size = Sao.config.display_size;
|
||||
},
|
||||
get editable() {
|
||||
|
||||
Reference in New Issue
Block a user