diff --git a/app/assets/javascripts/repositories/repository_datatable.js b/app/assets/javascripts/repositories/repository_datatable.js index 6fcf35f30..21aab671d 100644 --- a/app/assets/javascripts/repositories/repository_datatable.js +++ b/app/assets/javascripts/repositories/repository_datatable.js @@ -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(); } diff --git a/app/assets/javascripts/repository_columns/index.js b/app/assets/javascripts/repository_columns/index.js index b95f6f630..5cf451c86 100644 --- a/app/assets/javascripts/repository_columns/index.js +++ b/app/assets/javascripts/repository_columns/index.js @@ -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)`); + } }); } diff --git a/app/assets/stylesheets/repositories.scss b/app/assets/stylesheets/repositories.scss index 8ea425b8a..d6e3a79f1 100644 --- a/app/assets/stylesheets/repositories.scss +++ b/app/assets/stylesheets/repositories.scss @@ -226,7 +226,6 @@ .file-preview-link { display: inline-block; - min-width: 140px; padding-left: 5px; } }