summaryrefslogtreecommitdiff
path: root/addons/web/static/src/js/views/list
diff options
context:
space:
mode:
authorHardik Prajapati <hap@odoo.com>2020-03-16 04:57:23 +0000
committerAaron Bohy <aab@odoo.com>2020-05-13 08:08:57 +0000
commitd58edef12aab50fcd4494ba3b276e7d9d58d4d56 (patch)
tree9c8613b5221d8d90cc54a156d7ad5beae14ecad8 /addons/web/static/src/js/views/list
parent747aca10c19325431e87c84e0f0c471ec30a1315 (diff)
[FIX] web: resize lists in form: both lists extended
Have two x2many lists in a group in a form view. Increase the width of a column in the first table. Before this commit, the second table was also expanded. task-2189968 closes odoo/odoo#47652 Signed-off-by: Aaron Bohy (aab) <aab@odoo.com> Co-authored-by: Mohammed Shekha <msh@odoo.com>
Diffstat (limited to 'addons/web/static/src/js/views/list')
-rw-r--r--addons/web/static/src/js/views/list/list_editable_renderer.js5
1 files changed, 5 insertions, 0 deletions
diff --git a/addons/web/static/src/js/views/list/list_editable_renderer.js b/addons/web/static/src/js/views/list/list_editable_renderer.js
index 6bf2bdc29c6..278a5f2e896 100644
--- a/addons/web/static/src/js/views/list/list_editable_renderer.js
+++ b/addons/web/static/src/js/views/list/list_editable_renderer.js
@@ -1703,6 +1703,11 @@ ListRenderer.include({
'mouseup',
];
+ // Fix container width to prevent the table from overflowing when being resized
+ if (!this.el.style.width) {
+ this.el.style.width = `${initialTableWidth}px`;
+ }
+
// Apply classes to table and selected column
table.classList.add('o_resizing');
resizingColumnElements.forEach(el => el.classList.add('o_column_resizing'));