Skip to content

Commit

Permalink
fixed bootstrap table columns not hiding
Browse files Browse the repository at this point in the history
  • Loading branch information
MarioRadu committed Dec 12, 2023
1 parent d4dcf42 commit 59ee22b
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
2 changes: 1 addition & 1 deletion public/js/app.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

7 changes: 5 additions & 2 deletions src/App/assets/js/components/_bsTable.js
Original file line number Diff line number Diff line change
Expand Up @@ -153,10 +153,13 @@ $( document ).ready(function(){

request('GET', `/setting/get-setting/${identifier}`)
.then(data => {
bsTable.bootstrapTable('hideAllColumns');
const visibleColumns = bsTable.bootstrapTable('getVisibleColumns');
visibleColumns.forEach(column => {
bsTable.bootstrapTable('hideColumn', column.field);
});
data?.data?.value?.forEach(column => {
bsTable.bootstrapTable('showColumn', column);
});
}).catch(error => console.error('Error:', error));
}).catch(error => console.error('Error:', error));

});

0 comments on commit 59ee22b

Please sign in to comment.