Skip to content

Commit

Permalink
Merge pull request #205 from dotkernel/issue-197
Browse files Browse the repository at this point in the history
Fixed bootstrap table columns not hiding
  • Loading branch information
arhimede authored Dec 13, 2023
2 parents 2d9a872 + 59ee22b commit 353f3c6
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 353f3c6

Please sign in to comment.