mirror of
https://github.com/Mottie/tablesorter.git
synced 2024-11-15 23:54:22 +00:00
Scroller: refresh column sizes after update; see #906 (issue 3)
This commit is contained in:
parent
4912c556de
commit
ed321c20bd
2
dist/js/widgets/widget-scroller.min.js
vendored
2
dist/js/widgets/widget-scroller.min.js
vendored
File diff suppressed because one or more lines are too long
@ -252,7 +252,7 @@ ts.scroller = {
|
|||||||
|
|
||||||
// Sorting, so scroll to top
|
// Sorting, so scroll to top
|
||||||
$table
|
$table
|
||||||
.off( 'sortEnd' + namespace + ' setFixedColumnSize' + namespace )
|
.off( 'sortEnd setFixedColumnSize updateComplete '.split( ' ' ).join( namespace + ' ' ) )
|
||||||
.on( 'sortEnd' + namespace, function() {
|
.on( 'sortEnd' + namespace, function() {
|
||||||
if ( wo.scroller_upAfterSort ) {
|
if ( wo.scroller_upAfterSort ) {
|
||||||
$table.parent().animate({ scrollTop: 0 }, 'fast' );
|
$table.parent().animate({ scrollTop: 0 }, 'fast' );
|
||||||
@ -270,6 +270,10 @@ ts.scroller = {
|
|||||||
} else {
|
} else {
|
||||||
wo.scroller_$container.removeClass( tscss.scrollerHasFix );
|
wo.scroller_$container.removeClass( tscss.scrollerHasFix );
|
||||||
}
|
}
|
||||||
|
})
|
||||||
|
.on( 'updateComplete' + namespace, function() {
|
||||||
|
// adjust column sizes after an update
|
||||||
|
ts.scroller.resize( c, wo );
|
||||||
});
|
});
|
||||||
|
|
||||||
// Setup window.resizeEnd event
|
// Setup window.resizeEnd event
|
||||||
|
Loading…
Reference in New Issue
Block a user