Merge pull request #5872 from artoscinote/ma_SCI_8934

Fix loading of column order if no sizes are present [SCI-8934]
This commit is contained in:
artoscinote 2023-07-26 16:09:42 +02:00 committed by GitHub
commit 919d59bead
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -565,7 +565,7 @@ var RepositoryDatatable = (function(global) {
saveState(state);
},
stateLoadCallback: (state) => {
if (!TABLE.ColSizes) return;
if (!TABLE.ColSizes || TABLE.ColSizes.length === 0) return;
let colSizes = TABLE.ColSizes;
@ -754,8 +754,6 @@ var RepositoryDatatable = (function(global) {
});
},
stateSaveCallback: function(_, data) {
if (Object.keys(colSizeMap).length === 0) return true;
let colSizes = [];
for (let i = 0; i < data.ColReorder.length; i += 1) {