Add sort method to hide hidden columns in products sortable (#31866)

Co-authored-by: Jorge Torres <jorge@0xbad.com>
This commit is contained in:
Johan de Jong 2022-06-21 20:26:43 +02:00 committed by GitHub
parent ef8cf9f460
commit ca524a7266
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 14 additions and 1 deletions

View File

@ -0,0 +1,4 @@
Significance: minor
Type: fix
Fix for broken table layout when reordering products on the sorting screen.

View File

@ -66,6 +66,15 @@ jQuery( function( $ ) {
$( this ).removeClass( 'alternate' ); $( this ).removeClass( 'alternate' );
} }
}); });
},
sort: function (e, ui) {
ui.placeholder.find( 'td' ).each( function( key, value ) {
if ( ui.helper.find( 'td' ).eq( key ).is( ':visible' ) ) {
$( this ).show();
} else {
$( this ).hide();
}
});
} }
}); });
}); });