Skip to content

Commit

Permalink
Hide toggle butto if table not wrapped
Browse files Browse the repository at this point in the history
  • Loading branch information
abeverley committed Sep 20, 2023
1 parent f98697f commit 13b4922
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/frontend/components/data-table/lib/component.js
Original file line number Diff line number Diff line change
Expand Up @@ -559,6 +559,12 @@ class DataTableComponent extends Component {
self.addSearchDropdown(column, id, index)
}
})
// If the table has not wrapped (become responsive) then hide the toggle button
if (!this.el.hasClass("collapsed")) {
if (this.el.closest('.dataTables_wrapper').find('.btn-toggle-off').length) {
this.el.closest('.dataTables_wrapper').find('.dataTables_toggle_full_width').hide()
}
}
}

conf['drawCallback'] = (settings) => {
Expand Down

0 comments on commit 13b4922

Please sign in to comment.