mirror of
https://github.com/scinote-eln/scinote-web.git
synced 2025-09-26 06:54:48 +08:00
Hide last pinned resize cell in tables [SCI-10441]
This commit is contained in:
parent
469c23b02b
commit
79fd08c826
2 changed files with 13 additions and 4 deletions
|
@ -57,10 +57,6 @@ html {
|
|||
display: none;
|
||||
}
|
||||
|
||||
/* Hide right border of last pined column header. */
|
||||
.ag-pinned-left-header .ag-header-cell:last-child .ag-header-cell-resize:after {
|
||||
opacity: 0;
|
||||
}
|
||||
.ag-theme-alpine {
|
||||
--ag-font-family: "SN Inter", "Open Sans", Arial, Helvetica, sans-serif !important;
|
||||
}
|
||||
|
|
|
@ -612,9 +612,11 @@ export default {
|
|||
},
|
||||
pinColumn(column) {
|
||||
this.columnApi.setColumnPinned(column.field, 'left');
|
||||
this.hideLastPinnedResizeCell();
|
||||
},
|
||||
unPinColumn(column) {
|
||||
this.columnApi.setColumnPinned(column.field, null);
|
||||
this.hideLastPinnedResizeCell();
|
||||
},
|
||||
reorderColumns(columns) {
|
||||
this.columnApi.moveColumns(columns, 1);
|
||||
|
@ -643,6 +645,7 @@ export default {
|
|||
},
|
||||
onColumnMoved(event) {
|
||||
if (event.finished) {
|
||||
this.hideLastPinnedResizeCell();
|
||||
this.saveTableState();
|
||||
}
|
||||
},
|
||||
|
@ -650,6 +653,16 @@ export default {
|
|||
if (event.finished) {
|
||||
this.saveTableState();
|
||||
}
|
||||
},
|
||||
hideLastPinnedResizeCell() {
|
||||
$('.ag-pinned-left-header .ag-header-cell .ag-header-cell-resize').css('opacity', 100);
|
||||
let lastPinnedColIndex = 0;
|
||||
// eslint-disable-next-line func-names
|
||||
$('.ag-pinned-left-header .ag-header-cell').each(function () {
|
||||
const colIndex = parseInt($(this).attr('aria-colindex'), 10);
|
||||
if (colIndex > lastPinnedColIndex) lastPinnedColIndex = colIndex;
|
||||
});
|
||||
$(`.ag-pinned-left-header .ag-header-cell[aria-colindex="${lastPinnedColIndex}"] .ag-header-cell-resize`).css('opacity', 0);
|
||||
}
|
||||
}
|
||||
};
|
||||
|
|
Loading…
Add table
Reference in a new issue