Skip to content

Commit 59ee22b

Browse files
committed
fixed bootstrap table columns not hiding
1 parent d4dcf42 commit 59ee22b

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)