Increase dataTables_scrollbody width when it has y-overflow [SCI-8610] (#6598)

This commit is contained in:
wandji 2023-11-10 14:58:15 +01:00 committed by GitHub
parent 0c8ecb89b7
commit 64669dee4d
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 8 additions and 1 deletions

View file

@ -57,6 +57,10 @@ var RepositoryDatatable = (function(global) {
}
function restoreColumnSizes() {
const scrollBody = $('.dataTables_scrollBody');
if (scrollBody[0].offsetWidth > scrollBody[0].clientWidth) {
scrollBody.css('width', `calc(100% + ${scrollBody[0].offsetWidth - scrollBody[0].clientWidth}px)`);
}
TABLE.colResize.restore();
}

View file

@ -262,6 +262,10 @@ var RepositoryColumns = (function() {
if (!_.isEmpty(searchText)) {
TABLE.search(searchText).draw();
}
const scrollBody = $('.dataTables_scrollBody');
if (scrollBody[0].offsetWidth > scrollBody[0].clientWidth) {
scrollBody.css('width', `calc(100% + ${scrollBody[0].offsetWidth - scrollBody[0].clientWidth}px)`);
}
});
}

View file

@ -226,7 +226,6 @@
.file-preview-link {
display: inline-block;
min-width: 140px;
padding-left: 5px;
}
}