Skip to content

Commit 353f3c6

Browse files
authored
Merge pull request #205 from dotkernel/issue-197
Fixed bootstrap table columns not hiding
2 parents 2d9a872 + 59ee22b commit 353f3c6

2 files changed

Lines changed: 6 additions & 3 deletions

File tree

public/js/app.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/App/assets/js/components/_bsTable.js

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -153,10 +153,13 @@ $( document ).ready(function(){
153153

154154
request('GET', `/setting/get-setting/${identifier}`)
155155
.then(data => {
156-
bsTable.bootstrapTable('hideAllColumns');
156+
const visibleColumns = bsTable.bootstrapTable('getVisibleColumns');
157+
visibleColumns.forEach(column => {
158+
bsTable.bootstrapTable('hideColumn', column.field);
159+
});
157160
data?.data?.value?.forEach(column => {
158161
bsTable.bootstrapTable('showColumn', column);
159162
});
160-
}).catch(error => console.error('Error:', error));
163+
}).catch(error => console.error('Error:', error));
161164

162165
});

0 commit comments

Comments
 (0)