3
0
Fork 0

[MIG] web_remember_tree_column_width: Migration to 17.0

17.0
Cuong, Nguyen Minh Tran Manh 2024-01-19 18:41:03 +07:00
parent 59e09b776a
commit f89a90f83a
2 changed files with 6 additions and 6 deletions

View File

@ -5,7 +5,7 @@
"website": "https://github.com/OCA/web",
"license": "LGPL-3",
"category": "Extra Tools",
"version": "16.0.1.0.1",
"version": "17.0.1.0.0",
"maintainers": [
"frahikLV",
"luisg123v",

View File

@ -2,14 +2,14 @@
import {ListRenderer} from "@web/views/list/list_renderer";
import {browser} from "@web/core/browser/browser";
import {patch} from "web.utils";
import {patch} from "@web/core/utils/patch";
patch(ListRenderer.prototype, "web_remember_tree_column_width.ListRenderer", {
patch(ListRenderer.prototype, {
/**
* @override
*/
computeColumnWidthsFromContent() {
const columnWidths = this._super.apply(this, arguments);
computeColumnWidthsFromContent(allowedWidth) {
const columnWidths = super.computeColumnWidthsFromContent(allowedWidth);
const table = this.tableRef.el;
const thElements = [...table.querySelectorAll("thead th")];
thElements.forEach((el, elIndex) => {
@ -35,7 +35,7 @@ patch(ListRenderer.prototype, "web_remember_tree_column_width.ListRenderer", {
* @override
*/
onStartResize(ev) {
this._super.apply(this, arguments);
super.onStartResize(ev);
const resizeStoppingEvents = ["keydown", "mousedown", "mouseup"];
const $th = $(ev.target.closest("th"));
if (!$th || !$th.is("th")) {