[IMP] web: remove hover effect on list columns

The hover effect is rather strong and has low usefulness (the "chevron"
icon still appears) and can interfere with the current "sorting column"
decoration. We can safely remove it.

X-original-commit: f70fcbc8d1971c68546242c59caaae7f8481acf2
Part-of: odoo/odoo#122111
This commit is contained in:
Damien Bouvy
2023-05-23 22:32:44 +02:00
parent 9d2d9cc504
commit 4bff0c04bb
2 changed files with 0 additions and 16 deletions
@@ -1839,20 +1839,6 @@ export class ListRenderer extends Component {
});
}
/**
* Handles the :hover effect on sortable column headers
*
* @private
* @param {MouseEvent} ev
*/
onHoverSortColumn(ev, column) {
if (this.props.list.orderBy.length && this.props.list.orderBy[0].name === column.name) {
return;
} else if (this.isSortable(column) && column.widget !== "handle") {
ev.target.classList.toggle("table-active", ev.type == "mouseenter");
}
}
onColumnTitleMouseUp() {
if (this.resizing) {
this.preventReorder = true;
@@ -20,8 +20,6 @@
<th t-if="column.type === 'field'"
t-att-data-name="column.name"
t-att-class="getColumnClass(column) + ' opacity-trigger-hover'"
t-on-mouseenter="ev => this.onHoverSortColumn(ev, column)"
t-on-mouseleave="ev => this.onHoverSortColumn(ev, column)"
t-on-mouseup="onColumnTitleMouseUp"
t-on-click="() => this.onClickSortColumn(column)"
t-on-keydown.synthetic="(ev) => this.onCellKeydown(ev)"