[IMP] web_editor: scroll to new element of we-list
This commit improves the ListUserValueWidget to scoll to the new element when the user adds a new element. task-2601533 closes odoo/odoo#81241 Signed-off-by: Vray Benjamin (bvr) <bvr@odoo.com>
This commit is contained in:
@@ -2249,6 +2249,9 @@ const ListUserValueWidget = UserValueWidget.extend({
|
||||
}
|
||||
this._addItemToTable(undefined, this.el.dataset.defaultValue, recordData);
|
||||
this._notifyCurrentState();
|
||||
// Scroll to the new list element.
|
||||
this.el.querySelector('tr:last-child')
|
||||
.scrollIntoView({behavior: 'smooth', block: 'nearest'});
|
||||
},
|
||||
/**
|
||||
* @private
|
||||
|
||||
Reference in New Issue
Block a user