Skip to content

Commit

Permalink
feat(core): ✨ add HTML class to disable table wrapper
Browse files Browse the repository at this point in the history
Adding the class `.citizen-table-nowrap` will stop Citizen from adding wrapper to the table
  • Loading branch information
alistair3149 committed May 1, 2023
1 parent 6afb1bb commit b2eaf0a
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions resources/skins.citizen.scripts/tables.js
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,11 @@ function setupOverflowState( element ) {
* @return {void}
*/
function wrapTable( table ) {
// Don't do anything if there is a nowrap class
if ( table.classList.contains( 'citizen-table-nowrap' ) ) {
return;
}

const wrapper = document.createElement( 'div' );
wrapper.classList.add( 'citizen-table-wrapper' );
table.parentNode.insertBefore( wrapper, table );
Expand Down

0 comments on commit b2eaf0a

Please sign in to comment.